diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-08-03 18:38:43 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-08-03 18:38:59 +0200 |
commit | 1e378a7ca868e8c75099c3210b18108d12a1708f (patch) | |
tree | e15b1eebdc51a6ce845fb8a5e1d6f8f74654b872 /package | |
parent | 3d09b0dd650df254b40315cf674d7754e8a279f0 (diff) |
samba: fix compile with musl toolchain
Patches from Alpine Linux allowing to compile
samba with musl toolchain.
Reported-By: Ints M <idr.sia@inbox.lv>
Diffstat (limited to 'package')
-rw-r--r-- | package/samba/Makefile | 2 | ||||
-rw-r--r-- | package/samba/files/cache.txt | 1 | ||||
-rw-r--r-- | package/samba/patches/patch-nsswitch_wins_c | 17 | ||||
-rw-r--r-- | package/samba/patches/patch-source3_lib_util_c | 8 | ||||
-rw-r--r-- | package/samba/patches/patch-source4_torture_local_nss_tests_c | 78 |
5 files changed, 101 insertions, 5 deletions
diff --git a/package/samba/Makefile b/package/samba/Makefile index 3dc1ef642..d97167eab 100644 --- a/package/samba/Makefile +++ b/package/samba/Makefile @@ -5,7 +5,7 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= samba PKG_VERSION:= 4.6.6 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_HASH:= fc31c809f7d85ae30f2b7dcddcb8404201b626047458cb5f2b743d4f6f3f1a8e PKG_DESCR:= file and print server PKG_SECTION:= net/fs diff --git a/package/samba/files/cache.txt b/package/samba/files/cache.txt index c9e34b630..3ba8a75ea 100644 --- a/package/samba/files/cache.txt +++ b/package/samba/files/cache.txt @@ -23,6 +23,7 @@ Checking whether setreuid is available: OK Checking whether setresuid is available: OK Checking whether seteuid is available: OK Checking whether fcntl locking is available: OK +Checking whether fcntl lock supports open file description locks: OK Checking for the maximum value of the 'time_t' type: OK Checking whether the realpath function allows a NULL argument: OK Checking whether POSIX capabilities are available: OK diff --git a/package/samba/patches/patch-nsswitch_wins_c b/package/samba/patches/patch-nsswitch_wins_c new file mode 100644 index 000000000..92aa624f5 --- /dev/null +++ b/package/samba/patches/patch-nsswitch_wins_c @@ -0,0 +1,17 @@ +--- samba-4.6.6.orig/nsswitch/wins.c 2017-01-09 09:12:30.000000000 +0100 ++++ samba-4.6.6/nsswitch/wins.c 2017-08-02 22:28:16.616627669 +0200 +@@ -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, diff --git a/package/samba/patches/patch-source3_lib_util_c b/package/samba/patches/patch-source3_lib_util_c index 41b3afb06..5755bb837 100644 --- a/package/samba/patches/patch-source3_lib_util_c +++ b/package/samba/patches/patch-source3_lib_util_c @@ -1,6 +1,6 @@ ---- samba-4.2.1.orig/source3/lib/util.c 2015-01-16 09:18:39.000000000 +0100 -+++ samba-4.2.1/source3/lib/util.c 2015-04-26 13:26:28.000000000 +0200 -@@ -562,6 +562,7 @@ char *get_mydnsdomname(TALLOC_CTX *ctx) +--- samba-4.6.6.orig/source3/lib/util.c 2017-02-09 08:45:27.000000000 +0100 ++++ samba-4.6.6/source3/lib/util.c 2017-08-02 21:54:59.695281066 +0200 +@@ -565,6 +565,7 @@ char *get_mydnsdomname(TALLOC_CTX *ctx) } } @@ -8,7 +8,7 @@ #if (defined(HAVE_NETGROUP) && defined(WITH_AUTOMOUNT)) /****************************************************************** Remove any mount options such as -rsize=2048,wsize=2048 etc. -@@ -684,6 +685,7 @@ char *automount_lookup(TALLOC_CTX *ctx, +@@ -687,6 +688,7 @@ char *automount_lookup(TALLOC_CTX *ctx, } #endif /* WITH_NISPLUS_HOME */ #endif diff --git a/package/samba/patches/patch-source4_torture_local_nss_tests_c b/package/samba/patches/patch-source4_torture_local_nss_tests_c new file mode 100644 index 000000000..bb6ed3fb2 --- /dev/null +++ b/package/samba/patches/patch-source4_torture_local_nss_tests_c @@ -0,0 +1,78 @@ +--- samba-4.6.6.orig/source4/torture/local/nss_tests.c 2017-01-09 09:12:33.000000000 +0100 ++++ samba-4.6.6/source4/torture/local/nss_tests.c 2017-08-03 07:58:11.514847082 +0200 +@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct tortu + return true; + } + +- + static bool test_getgrgid(struct torture_context *tctx, + gid_t gid, + struct group *grp_p) +@@ -333,6 +332,7 @@ static bool test_enum_passwd(struct tort + return true; + } + ++#if HAVE_GETPWENT_R + static bool test_enum_r_passwd(struct torture_context *tctx, + struct passwd **pwd_array_p, + size_t *num_pwd_p) +@@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct to + + return true; + } ++#endif + + static bool torture_assert_passwd_equal(struct torture_context *tctx, + const struct passwd *p1, +@@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture + struct passwd *pwd, pwd1, pwd2; + size_t num_pwd; + +- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd), ++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd), + "failed to enumerate passwd"); + + for (i=0; i < num_pwd; i++) { +@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct t + struct passwd *pwd, pwd1, pwd2, pwd3, pwd4; + size_t num_pwd; + +- torture_assert(tctx, test_enum_r_passwd(tctx, &pwd, &num_pwd), ++ torture_assert(tctx, test_enum_passwd(tctx, &pwd, &num_pwd), + "failed to enumerate passwd"); + + for (i=0; i < num_pwd; i++) { +@@ -531,6 +532,7 @@ static bool test_enum_group(struct tortu + return true; + } + ++#if HAVE_GETGRENT_R + static bool test_enum_r_group(struct torture_context *tctx, + struct group **grp_array_p, + size_t *num_grp_p) +@@ -579,6 +581,7 @@ static bool test_enum_r_group(struct tor + + return true; + } ++#endif + + static bool torture_assert_group_equal(struct torture_context *tctx, + const struct group *g1, +@@ -635,7 +638,7 @@ static bool test_group_r(struct torture_ + struct group *grp, grp1, grp2; + size_t num_grp; + +- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp), ++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp), + "failed to enumerate group"); + + for (i=0; i < num_grp; i++) { +@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct to + struct group *grp, grp1, grp2, grp3, grp4; + size_t num_grp; + +- torture_assert(tctx, test_enum_r_group(tctx, &grp, &num_grp), ++ torture_assert(tctx, test_enum_group(tctx, &grp, &num_grp), + "failed to enumerate group"); + + for (i=0; i < num_grp; i++) { |