libxml.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Index: include/libxml/hash.h
  2. --- include/libxml/hash.h.orig 2003-09-09 22:18:00.000000000 +0200
  3. +++ include/libxml/hash.h 2003-11-28 20:19:02.000000000 +0100
  4. @@ -18,9 +18,6 @@
  5. #ifndef __XML_HASH_H__
  6. #define __XML_HASH_H__
  7. -#include <libxml/xmlversion.h>
  8. -#include <libxml/parser.h>
  9. -
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. @@ -31,6 +28,17 @@
  14. typedef struct _xmlHashTable xmlHashTable;
  15. typedef xmlHashTable *xmlHashTablePtr;
  16. +#ifdef __cplusplus
  17. +}
  18. +#endif
  19. +
  20. +#include <libxml/xmlversion.h>
  21. +#include <libxml/parser.h>
  22. +
  23. +#ifdef __cplusplus
  24. +extern "C" {
  25. +#endif
  26. +
  27. /*
  28. * function types:
  29. */
  30. Index: nanoftp.c
  31. --- nanoftp.c.orig 2003-10-29 14:27:37.000000000 +0100
  32. +++ nanoftp.c 2003-11-28 20:18:23.000000000 +0100
  33. @@ -1553,7 +1553,7 @@
  34. memset (&dataAddr, 0, sizeof(dataAddr));
  35. #ifdef SUPPORT_IP6
  36. - if ((ctxt->ftpAddr).ss_family == AF_INET6) {
  37. + if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6) {
  38. ctxt->dataFd = socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
  39. ((struct sockaddr_in6 *)&dataAddr)->sin6_family = AF_INET6;
  40. dataAddrLen = sizeof(struct sockaddr_in6);
  41. @@ -1572,7 +1572,7 @@
  42. if (ctxt->passive) {
  43. #ifdef SUPPORT_IP6
  44. - if ((ctxt->ftpAddr).ss_family == AF_INET6)
  45. + if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6)
  46. snprintf (buf, sizeof(buf), "EPSV\r\n");
  47. else
  48. #endif
  49. @@ -1603,7 +1603,7 @@
  50. cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
  51. while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
  52. #ifdef SUPPORT_IP6
  53. - if ((ctxt->ftpAddr).ss_family == AF_INET6) {
  54. + if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6) {
  55. if (sscanf (cur, "%u", &temp[0]) != 1) {
  56. __xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER,
  57. "Invalid answer to EPSV\n");
  58. @@ -1640,7 +1640,7 @@
  59. } else {
  60. getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen);
  61. #ifdef SUPPORT_IP6
  62. - if ((ctxt->ftpAddr).ss_family == AF_INET6)
  63. + if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6)
  64. ((struct sockaddr_in6 *)&dataAddr)->sin6_port = 0;
  65. else
  66. #endif
  67. @@ -1659,7 +1659,7 @@
  68. return (-1);
  69. }
  70. #ifdef SUPPORT_IP6
  71. - if ((ctxt->ftpAddr).ss_family == AF_INET6) {
  72. + if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6) {
  73. char buf6[INET6_ADDRSTRLEN];
  74. inet_ntop (AF_INET6, &((struct sockaddr_in6 *)&dataAddr)->sin6_addr,
  75. buf6, INET6_ADDRSTRLEN);