aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/gsoap/gsoap/0001-stdgsoap2-Fix-build-with-musl.patch
blob: 571cbe540920a46d41168ea1223a373c4ce00ee9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From db260fbc7af4c73c997c485a0c69c61594a0e59c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 30 Aug 2017 19:48:50 -0700
Subject: [PATCH] stdgsoap2: Fix build with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 gsoap/stdsoap2.c   | 2 +-
 gsoap/stdsoap2.cpp | 4 ++--
 gsoap/stdsoap2.h   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gsoap/stdsoap2.c b/gsoap/stdsoap2.c
index 58e9df4..62389e1 100644
--- a/gsoap/stdsoap2.c
+++ b/gsoap/stdsoap2.c
@@ -4462,7 +4462,7 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
       return soap->error = SOAP_EOM;
     return SOAP_OK;
   }
-#if defined(__GLIBC__) || (defined(HAVE_GETHOSTBYNAME_R) && (defined(FREEBSD) || defined(__FreeBSD__))) || defined(__ANDROID__)
+#if defined(LINUX) || (defined(HAVE_GETHOSTBYNAME_R) && (defined(FREEBSD) || defined(__FreeBSD__))) || defined(__ANDROID__)
   if (gethostbyname_r(addr, &hostent, soap->buf, sizeof(soap->buf), &host, &soap->errnum) < 0)
     host = NULL;
 #elif defined(_AIX43) || ((defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R))
diff --git a/gsoap/stdsoap2.cpp b/gsoap/stdsoap2.cpp
index 58e9df4..b637161 100644
--- a/gsoap/stdsoap2.cpp
+++ b/gsoap/stdsoap2.cpp
@@ -4462,7 +4462,7 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
       return soap->error = SOAP_EOM;
     return SOAP_OK;
   }
-#if defined(__GLIBC__) || (defined(HAVE_GETHOSTBYNAME_R) && (defined(FREEBSD) || defined(__FreeBSD__))) || defined(__ANDROID__)
+#if defined(LINUX) || (defined(HAVE_GETHOSTBYNAME_R) && (defined(FREEBSD) || defined(__FreeBSD__))) || defined(__ANDROID__)
   if (gethostbyname_r(addr, &hostent, soap->buf, sizeof(soap->buf), &host, &soap->errnum) < 0)
     host = NULL;
 #elif defined(_AIX43) || ((defined(TRU64) || defined(HP_UX)) && defined(HAVE_GETHOSTBYNAME_R))
@@ -19658,7 +19658,7 @@ soap_strerror(struct soap *soap)
   {
 #ifndef WIN32
 # ifdef HAVE_STRERROR_R
-#  if defined(_GNU_SOURCE) && !defined(__ANDROID__)
+#  if defined(_GNU_SOURCE) && !defined(__ANDROID__) && defined(__GLIBC__)
     return strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* GNU-specific */
 #  else
     strerror_r(err, soap->msgbuf, sizeof(soap->msgbuf)); /* XSI-compliant */
diff --git a/gsoap/stdsoap2.h b/gsoap/stdsoap2.h
index 07a3952..c6ace4c 100644
--- a/gsoap/stdsoap2.h
+++ b/gsoap/stdsoap2.h
@@ -947,7 +947,7 @@ extern "C" {
 # endif
 #elif defined(SOCKLEN_T)
 # define SOAP_SOCKLEN_T SOCKLEN_T
-#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) || defined(_XOPEN_SOURCE)
+#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__) || defined(_XOPEN_SOURCE) || defined (LINUX)
 # define SOAP_SOCKLEN_T socklen_t
 #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
 # define SOAP_SOCKLEN_T int
-- 
2.14.1