diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-03-12 13:37:31 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-03-12 13:43:58 -0700 |
| commit | 175bfc1909faaffa2d87c7d2ad4839074c379375 (patch) | |
| tree | 1984d3519aa1fa61b44c6c9180979ba0ace722c5 | |
| parent | e9df01df3db8fd67102e53c6a424bc0128100573 (diff) | |
| download | meta-openembedded-175bfc1909faaffa2d87c7d2ad4839074c379375.tar.gz | |
gsoap: Upgrade to 2.8.126
Fix build with musl while here
Enable IPv6 and C locales at least
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch | 94 | ||||
| -rw-r--r-- | meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb (renamed from meta-oe/recipes-support/gsoap/gsoap_2.8.124.bb) | 7 |
2 files changed, 98 insertions, 3 deletions
diff --git a/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch b/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch new file mode 100644 index 0000000000..3d12f733f0 --- /dev/null +++ b/meta-oe/recipes-support/gsoap/gsoap/0001-Simplify-check-for-gethostbyname_r.patch | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | From fa923a50790c907725c822b2fc7d63b2da62b4ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 12 Mar 2023 13:34:55 -0700 | ||
| 4 | Subject: [PATCH] Simplify check for gethostbyname_r() | ||
| 5 | |||
| 6 | This helps build fix with musl. | ||
| 7 | |||
| 8 | Imported from Alpine: https://git.alpinelinux.org/aports/tree/community/gsoap/musl-fixes.patch | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | gsoap/stdsoap2.c | 6 ++---- | ||
| 13 | gsoap/stdsoap2.cpp | 10 ++-------- | ||
| 14 | 2 files changed, 4 insertions(+), 12 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/gsoap/stdsoap2.c b/gsoap/stdsoap2.c | ||
| 17 | index 654a1e1..fa31d02 100644 | ||
| 18 | --- a/gsoap/stdsoap2.c | ||
| 19 | +++ b/gsoap/stdsoap2.c | ||
| 20 | @@ -5463,7 +5463,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, | ||
| 21 | hostent = NULL; | ||
| 22 | soap->errnum = h_errno; | ||
| 23 | } | ||
| 24 | -#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(HAVE_GETHOSTBYNAME_R) | ||
| 25 | +#elif defined(HAVE_GETHOSTBYNAME_R) | ||
| 26 | while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) | ||
| 27 | { | ||
| 28 | if (tmpbuf != soap->tmpbuf) | ||
| 29 | @@ -5478,8 +5478,6 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, | ||
| 30 | if (!tmpbuf) | ||
| 31 | break; | ||
| 32 | } | ||
| 33 | -#elif defined(HAVE_GETHOSTBYNAME_R) | ||
| 34 | - hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); | ||
| 35 | #elif defined(VXWORKS) | ||
| 36 | /* vxWorks compatible */ | ||
| 37 | /* If the DNS resolver library resolvLib has been configured in the vxWorks | ||
| 38 | @@ -23112,7 +23110,7 @@ soap_strerror(struct soap *soap) | ||
| 39 | { | ||
| 40 | #ifndef WIN32 | ||
| 41 | # ifdef HAVE_STRERROR_R | ||
| 42 | -# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) | ||
| 43 | +# if 1 | ||
| 44 | err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ | ||
| 45 | if (err != 0) | ||
| 46 | soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); | ||
| 47 | diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp | ||
| 48 | index 654a1e1..5fd5fd6 100644 | ||
| 49 | --- a/gsoap/stdsoap2.cpp | ||
| 50 | +++ b/gsoap/stdsoap2.cpp | ||
| 51 | @@ -5430,7 +5430,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, | ||
| 52 | { | ||
| 53 | #if (defined(_AIX43) || defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R) | ||
| 54 | struct hostent_data ht_data; | ||
| 55 | -#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(HAVE_GETHOSTBYNAME_R) | ||
| 56 | +#elif defined(HAVE_GETHOSTBYNAME_R) | ||
| 57 | int r; | ||
| 58 | char *tmpbuf = soap->tmpbuf; | ||
| 59 | size_t tmplen = sizeof(soap->tmpbuf); | ||
| 60 | @@ -5463,7 +5463,7 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, | ||
| 61 | hostent = NULL; | ||
| 62 | soap->errnum = h_errno; | ||
| 63 | } | ||
| 64 | -#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(HAVE_GETHOSTBYNAME_R) | ||
| 65 | +#elif defined(HAVE_GETHOSTBYNAME_R) | ||
| 66 | while ((r = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &hostent, &soap->errnum)) < 0) | ||
| 67 | { | ||
| 68 | if (tmpbuf != soap->tmpbuf) | ||
| 69 | @@ -5478,8 +5478,6 @@ tcp_gethostbyname(struct soap *soap, const char *addr, struct hostent *hostent, | ||
| 70 | if (!tmpbuf) | ||
| 71 | break; | ||
| 72 | } | ||
| 73 | -#elif defined(HAVE_GETHOSTBYNAME_R) | ||
| 74 | - hostent = gethostbyname_r(addr, hostent, tmpbuf, tmplen, &soap->errnum); | ||
| 75 | #elif defined(VXWORKS) | ||
| 76 | /* vxWorks compatible */ | ||
| 77 | /* If the DNS resolver library resolvLib has been configured in the vxWorks | ||
| 78 | @@ -23112,13 +23110,9 @@ soap_strerror(struct soap *soap) | ||
| 79 | { | ||
| 80 | #ifndef WIN32 | ||
| 81 | # ifdef HAVE_STRERROR_R | ||
| 82 | -# if !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && ((!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600))) | ||
| 83 | err = strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */ | ||
| 84 | if (err != 0) | ||
| 85 | soap_strcpy(soap->msgbuf, sizeof(soap->msgbuf), "unknown error"); | ||
| 86 | -# else | ||
| 87 | - return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */ | ||
| 88 | -# endif | ||
| 89 | # else | ||
| 90 | return strerror(err); | ||
| 91 | # endif | ||
| 92 | -- | ||
| 93 | 2.39.2 | ||
| 94 | |||
diff --git a/meta-oe/recipes-support/gsoap/gsoap_2.8.124.bb b/meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb index 22e0119798..6d8b53d308 100644 --- a/meta-oe/recipes-support/gsoap/gsoap_2.8.124.bb +++ b/meta-oe/recipes-support/gsoap/gsoap_2.8.126.bb | |||
| @@ -5,9 +5,9 @@ LICENSE = "GPL-2.0-with-OpenSSL-exception" | |||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4f40a941379143186f9602242c3fb729 \ | 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4f40a941379143186f9602242c3fb729 \ |
| 6 | file://GPLv2_license.txt;md5=a33672dbe491b6517750a0389063508b" | 6 | file://GPLv2_license.txt;md5=a33672dbe491b6517750a0389063508b" |
| 7 | 7 | ||
| 8 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}2/${BPN}_${PV}.zip \ | 8 | SRC_URI = "https://prdownloads.sourceforge.net/${BPN}2/${BPN}_${PV}.zip" |
| 9 | " | 9 | SRC_URI:append:libc-musl = " file://0001-Simplify-check-for-gethostbyname_r.patch" |
| 10 | SRC_URI[sha256sum] = "4b798780989338f665ef8e171bbcc422a271004d62d5852666d5eeca33a6a636" | 10 | SRC_URI[sha256sum] = "b65190ebf8c2517d6fafbdc2000bc7bc650d921a02f4aa53eb1e3df267592c4a" |
| 11 | 11 | ||
| 12 | inherit autotools | 12 | inherit autotools |
| 13 | 13 | ||
| @@ -15,6 +15,7 @@ BBCLASSEXTEND = "native" | |||
| 15 | 15 | ||
| 16 | S = "${WORKDIR}/${BPN}-2.8" | 16 | S = "${WORKDIR}/${BPN}-2.8" |
| 17 | 17 | ||
| 18 | EXTRA_OECONF += "--enable-ipv6 --enable-c-locale" | ||
| 18 | PARALLEL_MAKE = "" | 19 | PARALLEL_MAKE = "" |
| 19 | 20 | ||
| 20 | EXTRA_OEMAKE:class-target = "SOAP=${STAGING_BINDIR_NATIVE}/soapcpp2" | 21 | EXTRA_OEMAKE:class-target = "SOAP=${STAGING_BINDIR_NATIVE}/soapcpp2" |
