samba: Fix build with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Khem Raj 2017-06-02 21:58:33 -07:00 committed by Armin Kuster
parent 5fc21edf4a
commit fdb8e0d608
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,15 @@
Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c
===================================================================
--- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c
+++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c
@@ -166,8 +166,10 @@ int main(int argc, const char **argv)
if (ret == 0) {
pthread_mutex_unlock(mutex);
}
+#ifdef __GLIBC__
} else if (ret == EBUSY) {
printf("pid=%u\n", mutex->__data.__owner);
+#endif
} else if (ret == 0) {
pthread_mutex_unlock(mutex);
}

View File

@ -0,0 +1,19 @@
Index: samba-4.6.2/nsswitch/wins.c
===================================================================
--- samba-4.6.2.orig/nsswitch/wins.c
+++ samba-4.6.2/nsswitch/wins.c
@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex =
#define INADDRSZ 4
#endif
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL (-1)
+#endif
+
+#ifndef NETDB_SUCCESS
+#define NETDB_SUCCESS 0
+#endif
+
NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
struct hostent *he,
char *buffer,

View File

@ -18,6 +18,8 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
file://21-add-config-option-without-valgrind.patch \
file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \
file://0006-avoid-using-colon-in-the-checking-msg.patch \
file://netdb_defines.patch \
file://glibc_only.patch \
file://volatiles.03_samba \
"
SRC_URI_append_libc-musl = " \