aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-07-22 23:02:24 -0700
committerArmin Kuster <akuster808@gmail.com>2020-07-30 21:22:28 -0700
commite227d95f2f8c7fde5959ee49441b23d7754b1853 (patch)
treec5ea930ac3eae738a27c075d10c1f3da46918b78 /meta-networking
parentf1dc6e6f5dab205d20073ee6c10b406b304784fa (diff)
downloadmeta-openembedded-contrib-e227d95f2f8c7fde5959ee49441b23d7754b1853.tar.gz
meta-openembedded-contrib-e227d95f2f8c7fde5959ee49441b23d7754b1853.tar.bz2
meta-openembedded-contrib-e227d95f2f8c7fde5959ee49441b23d7754b1853.zip
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> (cherry picked from commit 5cf2665446f3fdc16b484c64afffaa0ac8373a35) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking')
-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 0000000000..2dbabdaa47
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch
@@ -0,0 +1,96 @@
+From 9aba5ac17bb822f91f6b214f5b82dd1eb8c47616 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Jul 2020 22:42:09 -0700
+Subject: [PATCH] nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h
+
+glibc 2.32 will define these varibles [1] which results in conflicts
+with these static function names, therefore prefix these function names
+with samba_ to avoid it
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d
+
+Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/-/merge_requests/1477]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ nsswitch/nsstest.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/nsswitch/nsstest.c b/nsswitch/nsstest.c
+index 6d92806..46f9679 100644
+--- a/nsswitch/nsstest.c
++++ b/nsswitch/nsstest.c
+@@ -137,7 +137,7 @@ static struct passwd *nss_getpwuid(uid_t uid)
+ return &pwd;
+ }
+
+-static void nss_setpwent(void)
++static void samba_nss_setpwent(void)
+ {
+ NSS_STATUS (*_nss_setpwent)(void) =
+ (NSS_STATUS(*)(void))find_fn("setpwent");
+@@ -152,7 +152,7 @@ static void nss_setpwent(void)
+ }
+ }
+
+-static void nss_endpwent(void)
++static void samba_nss_endpwent(void)
+ {
+ NSS_STATUS (*_nss_endpwent)(void) =
+ (NSS_STATUS (*)(void))find_fn("endpwent");
+@@ -284,7 +284,7 @@ again:
+ return &grp;
+ }
+
+-static void nss_setgrent(void)
++static void samba_nss_setgrent(void)
+ {
+ NSS_STATUS (*_nss_setgrent)(void) =
+ (NSS_STATUS (*)(void))find_fn("setgrent");
+@@ -299,7 +299,7 @@ static void nss_setgrent(void)
+ }
+ }
+
+-static void nss_endgrent(void)
++static void samba_nss_endgrent(void)
+ {
+ NSS_STATUS (*_nss_endgrent)(void) =
+ (NSS_STATUS (*)(void))find_fn("endgrent");
+@@ -396,7 +396,7 @@ static void nss_test_users(void)
+ {
+ struct passwd *pwd;
+
+- nss_setpwent();
++ samba_nss_setpwent();
+ /* loop over all users */
+ while ((pwd = nss_getpwent())) {
+ printf("Testing user %s\n", pwd->pw_name);
+@@ -418,14 +418,14 @@ static void nss_test_users(void)
+ printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid);
+ printf("\n");
+ }
+- nss_endpwent();
++ samba_nss_endpwent();
+ }
+
+ static void nss_test_groups(void)
+ {
+ struct group *grp;
+
+- nss_setgrent();
++ samba_nss_setgrent();
+ /* loop over all groups */
+ while ((grp = nss_getgrent())) {
+ printf("Testing group %s\n", grp->gr_name);
+@@ -446,7 +446,7 @@ static void nss_test_groups(void)
+ printf("getgrgid: "); print_group(grp);
+ printf("\n");
+ }
+- nss_endgrent();
++ samba_nss_endgrent();
+ }
+
+ static void nss_test_errors(void)
+--
+2.27.0
+
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 2c74c27fb8..01250cb43f 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 \
file://0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch \
file://0002-util_sec.c-Move-__thread-variable-to-global-scope.patch \
file://0001-Add-options-to-configure-the-use-of-libbsd.patch \
+ file://0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch \
"
SRC_URI_append_libc-musl = " \
file://samba-pam.patch \