summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-07-22 23:02:24 -0700
committerKhem Raj <raj.khem@gmail.com>2020-07-22 23:17:32 -0700
commit5cf2665446f3fdc16b484c64afffaa0ac8373a35 (patch)
treeef2b9d6699fada7c8319a91d1ff8f3037af91517
parentcfebe08b381671d4915a76be71830200ce8f7db8 (diff)
downloadmeta-openembedded-5cf2665446f3fdc16b484c64afffaa0ac8373a35.tar.gz
samba: Fix conflicts with nss.h from glibc
This is seen with glibc 2.32 where these names are also defined Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch96
-rw-r--r--meta-networking/recipes-connectivity/samba/samba_4.10.15.bb1
2 files changed, 97 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch b/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch
new file mode 100644
index 000000000..2dbabdaa4
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch
@@ -0,0 +1,96 @@
1From 9aba5ac17bb822f91f6b214f5b82dd1eb8c47616 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 22 Jul 2020 22:42:09 -0700
4Subject: [PATCH] nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h
5
6glibc 2.32 will define these varibles [1] which results in conflicts
7with these static function names, therefore prefix these function names
8with samba_ to avoid it
9
10[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d
11
12Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/-/merge_requests/1477]
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 nsswitch/nsstest.c | 16 ++++++++--------
17 1 file changed, 8 insertions(+), 8 deletions(-)
18
19diff --git a/nsswitch/nsstest.c b/nsswitch/nsstest.c
20index 6d92806..46f9679 100644
21--- a/nsswitch/nsstest.c
22+++ b/nsswitch/nsstest.c
23@@ -137,7 +137,7 @@ static struct passwd *nss_getpwuid(uid_t uid)
24 return &pwd;
25 }
26
27-static void nss_setpwent(void)
28+static void samba_nss_setpwent(void)
29 {
30 NSS_STATUS (*_nss_setpwent)(void) =
31 (NSS_STATUS(*)(void))find_fn("setpwent");
32@@ -152,7 +152,7 @@ static void nss_setpwent(void)
33 }
34 }
35
36-static void nss_endpwent(void)
37+static void samba_nss_endpwent(void)
38 {
39 NSS_STATUS (*_nss_endpwent)(void) =
40 (NSS_STATUS (*)(void))find_fn("endpwent");
41@@ -284,7 +284,7 @@ again:
42 return &grp;
43 }
44
45-static void nss_setgrent(void)
46+static void samba_nss_setgrent(void)
47 {
48 NSS_STATUS (*_nss_setgrent)(void) =
49 (NSS_STATUS (*)(void))find_fn("setgrent");
50@@ -299,7 +299,7 @@ static void nss_setgrent(void)
51 }
52 }
53
54-static void nss_endgrent(void)
55+static void samba_nss_endgrent(void)
56 {
57 NSS_STATUS (*_nss_endgrent)(void) =
58 (NSS_STATUS (*)(void))find_fn("endgrent");
59@@ -396,7 +396,7 @@ static void nss_test_users(void)
60 {
61 struct passwd *pwd;
62
63- nss_setpwent();
64+ samba_nss_setpwent();
65 /* loop over all users */
66 while ((pwd = nss_getpwent())) {
67 printf("Testing user %s\n", pwd->pw_name);
68@@ -418,14 +418,14 @@ static void nss_test_users(void)
69 printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid);
70 printf("\n");
71 }
72- nss_endpwent();
73+ samba_nss_endpwent();
74 }
75
76 static void nss_test_groups(void)
77 {
78 struct group *grp;
79
80- nss_setgrent();
81+ samba_nss_setgrent();
82 /* loop over all groups */
83 while ((grp = nss_getgrent())) {
84 printf("Testing group %s\n", grp->gr_name);
85@@ -446,7 +446,7 @@ static void nss_test_groups(void)
86 printf("getgrgid: "); print_group(grp);
87 printf("\n");
88 }
89- nss_endgrent();
90+ samba_nss_endgrent();
91 }
92
93 static void nss_test_errors(void)
94--
952.27.0
96
diff --git a/meta-networking/recipes-connectivity/samba/samba_4.10.15.bb b/meta-networking/recipes-connectivity/samba/samba_4.10.15.bb
index 2c74c27fb..01250cb43 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.10.15.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.10.15.bb
@@ -27,6 +27,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \
27 file://0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch \ 27 file://0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch \
28 file://0002-util_sec.c-Move-__thread-variable-to-global-scope.patch \ 28 file://0002-util_sec.c-Move-__thread-variable-to-global-scope.patch \
29 file://0001-Add-options-to-configure-the-use-of-libbsd.patch \ 29 file://0001-Add-options-to-configure-the-use-of-libbsd.patch \
30 file://0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch \
30 " 31 "
31SRC_URI_append_libc-musl = " \ 32SRC_URI_append_libc-musl = " \
32 file://samba-pam.patch \ 33 file://samba-pam.patch \