[xml] small patch for linux glibc 2.1.2
- From: Mike Stump <mrs apple com>
- To: xml gnome org
- Subject: [xml] small patch for linux glibc 2.1.2
- Date: Wed, 28 Jul 2004 23:43:58 -0700
I was trying to compile libxml2-2.6.11 on my linux system, glibc is
around 2.1.2 as I recall, it almost worked, but I needed the below
patch for it to work...
Doing diffs in .:
*** ./nanoftp.c.~1~ Sun Jun 27 09:14:08 2004
--- ./nanoftp.c Wed Jul 28 23:36:26 2004
*************** xmlNanoFTPGetConnection(void *ctx) {
*** 1555,1561 ****
memset (&dataAddr, 0, sizeof(dataAddr));
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).ss_family == AF_INET6) {
ctxt->dataFd = socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
((struct sockaddr_in6 *)&dataAddr)->sin6_family = AF_INET6;
dataAddrLen = sizeof(struct sockaddr_in6);
--- 1555,1561 ----
memset (&dataAddr, 0, sizeof(dataAddr));
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).__ss_family == AF_INET6) {
ctxt->dataFd = socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
((struct sockaddr_in6 *)&dataAddr)->sin6_family = AF_INET6;
dataAddrLen = sizeof(struct sockaddr_in6);
*************** xmlNanoFTPGetConnection(void *ctx) {
*** 1574,1580 ****
if (ctxt->passive) {
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).ss_family == AF_INET6)
snprintf (buf, sizeof(buf), "EPSV\r\n");
else
#endif
--- 1574,1580 ----
if (ctxt->passive) {
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).__ss_family == AF_INET6)
snprintf (buf, sizeof(buf), "EPSV\r\n");
else
#endif
*************** xmlNanoFTPGetConnection(void *ctx) {
*** 1605,1611 ****
cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).ss_family == AF_INET6) {
if (sscanf (cur, "%u", &temp[0]) != 1) {
__xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER,
"Invalid answer to EPSV\n");
--- 1605,1611 ----
cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).__ss_family == AF_INET6) {
if (sscanf (cur, "%u", &temp[0]) != 1) {
__xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER,
"Invalid answer to EPSV\n");
*************** xmlNanoFTPGetConnection(void *ctx) {
*** 1642,1648 ****
} else {
getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr,
&dataAddrLen);
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).ss_family == AF_INET6)
((struct sockaddr_in6 *)&dataAddr)->sin6_port = 0;
else
#endif
--- 1642,1648 ----
} else {
getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr,
&dataAddrLen);
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).__ss_family == AF_INET6)
((struct sockaddr_in6 *)&dataAddr)->sin6_port = 0;
else
#endif
*************** xmlNanoFTPGetConnection(void *ctx) {
*** 1661,1667 ****
return (-1);
}
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).ss_family == AF_INET6) {
char buf6[INET6_ADDRSTRLEN];
inet_ntop (AF_INET6, &((struct sockaddr_in6
*)&dataAddr)->sin6_addr,
buf6, INET6_ADDRSTRLEN);
--- 1661,1667 ----
return (-1);
}
#ifdef SUPPORT_IP6
! if ((ctxt->ftpAddr).__ss_family == AF_INET6) {
char buf6[INET6_ADDRSTRLEN];
inet_ntop (AF_INET6, &((struct sockaddr_in6
*)&dataAddr)->sin6_addr,
buf6, INET6_ADDRSTRLEN);
--------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]