diff options
Diffstat (limited to 'community/gsoap/musl-fixes.patch')
-rw-r--r-- | community/gsoap/musl-fixes.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/community/gsoap/musl-fixes.patch b/community/gsoap/musl-fixes.patch new file mode 100644 index 00000000000..33fe06fbb07 --- /dev/null +++ b/community/gsoap/musl-fixes.patch @@ -0,0 +1,76 @@ +diff --git a/gsoap/stdsoap2.c b/gsoap/stdsoap2.c +index 25de1af..5883d36 100644 +--- a/gsoap/stdsoap2.c ++++ b/gsoap/stdsoap2.c +@@ -5463,7 +5463,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, + hostent = NULL; + soap->errnum = h_errno; + } +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) ++#elif defined(HAVE_GETHOSTBYNAME_R) + while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) + { + if (tmpbuf != soap->tmpbuf) +@@ -5478,8 +5478,6 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, + if (!tmpbuf) + break; + } +-#elif defined(HAVE_GETHOSTBYNAME_R) +- hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); + #elif defined(VXWORKS) + /* vxWorks compatible */ + /* If the DNS resolver library resolvLib has been configured in the vxWorks +@@ -23118,7 +23116,7 @@ soap_strerror(struct soap *soap) + { + #ifndef WIN32 + # ifdef HAVE_STRERROR_R +-# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) ++# if 1 + err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ + if (err != 0) + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); +diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp +index 25de1af..5631b8b 100644 +--- a/gsoap/stdsoap2.cpp ++++ b/gsoap/stdsoap2.cpp +@@ -5430,7 +5430,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, + { + #if (defined(_AIX43) || defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R) + struct hostent_data ht_data; +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) ++#elif defined(HAVE_GETHOSTBYNAME_R) + int r; + char *tmpbuf = soap->tmpbuf; + size_t tmplen = sizeof(soap->tmpbuf); +@@ -5463,7 +5463,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, + hostent = NULL; + soap->errnum = h_errno; + } +-#elif (!defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__ANDROID__) || defined(FREEBSD) || defined(__FreeBSD__)) && !defined(SUN_OS) && !defined(__QNX__) && !defined(QNX) && defined(HAVE_GETHOSTBYNAME_R) ++#elif defined(HAVE_GETHOSTBYNAME_R) + while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) + { + if (tmpbuf != soap->tmpbuf) +@@ -5478,8 +5478,6 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, + if (!tmpbuf) + break; + } +-#elif defined(HAVE_GETHOSTBYNAME_R) +- hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); + #elif defined(VXWORKS) + /* vxWorks compatible */ + /* If the DNS resolver library resolvLib has been configured in the vxWorks +@@ -23118,13 +23116,9 @@ soap_strerror(struct soap *soap) + { + #ifndef WIN32 + # ifdef HAVE_STRERROR_R +-# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) + err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ + if (err != 0) + soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); +-# else +- return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */ +-# endif + # else + return strerror(err); + # endif |