From 1e378a7ca868e8c75099c3210b18108d12a1708f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 3 Aug 2017 18:38:43 +0200 Subject: samba: fix compile with musl toolchain Patches from Alpine Linux allowing to compile samba with musl toolchain. Reported-By: Ints M --- .../patch-source4_torture_local_nss_tests_c | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 package/samba/patches/patch-source4_torture_local_nss_tests_c (limited to 'package/samba/patches/patch-source4_torture_local_nss_tests_c') 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++) { -- cgit v1.2.3