From 7e6cb983a8dc3a80ac1284db51e8640af77fd7da Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Tue, 24 Nov 2020 20:04:11 +0100 Subject: [PATCH] net-fs/samba-4.11.13: add patch to fix build breakage with glibc-2.32 This commit adds amba-4.11-fix-glibc-2.32-function-collisions.patch which fixes compile breakage in a test shipped with Samba-4.11. The test defines functions which are now shipped with glibc-2.32. --- ...1-fix-glibc-2.32-function-collisions.patch | 79 +++++++++++++++++++ .../net-fs/samba/samba-4.11.13-r1.ebuild | 1 + 2 files changed, 80 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-4.11-fix-glibc-2.32-function-collisions.patch diff --git a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-4.11-fix-glibc-2.32-function-collisions.patch b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-4.11-fix-glibc-2.32-function-collisions.patch new file mode 100644 index 0000000000..5d196a68af --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-4.11-fix-glibc-2.32-function-collisions.patch @@ -0,0 +1,79 @@ +glibc-2.30 and above ship their own version of nss_setpwent, nss_endpwent, +nss_setgrent, and nss_endgrent. So we rename the static functions here to +prevent a name clash. + +Also see https://forums.gentoo.org/viewtopic-t-1118902.html?sid=e1809c2d407bafda1df63d9115bcaaef + +--- a/nsswitch/nsstest.c 2019-12-06 06:46:56.000000000 -0300 ++++ b/nsswitch/nsstest.c 2020-09-11 18:35:27.199949579 -0300 +@@ -137,7 +137,7 @@ + return &pwd; + } + +-static void nss_setpwent(void) ++static void nss_setpwent2(void) + { + NSS_STATUS (*_nss_setpwent)(void) = + (NSS_STATUS(*)(void))find_fn("setpwent"); +@@ -152,7 +152,7 @@ + } + } + +-static void nss_endpwent(void) ++static void nss_endpwent2(void) + { + NSS_STATUS (*_nss_endpwent)(void) = + (NSS_STATUS (*)(void))find_fn("endpwent"); +@@ -290,7 +290,7 @@ + return &grp; + } + +-static void nss_setgrent(void) ++static void nss_setgrent2(void) + { + NSS_STATUS (*_nss_setgrent)(void) = + (NSS_STATUS (*)(void))find_fn("setgrent"); +@@ -305,7 +305,7 @@ + } + } + +-static void nss_endgrent(void) ++static void nss_endgrent2(void) + { + NSS_STATUS (*_nss_endgrent)(void) = + (NSS_STATUS (*)(void))find_fn("endgrent"); +@@ -402,7 +402,7 @@ + { + struct passwd *pwd; + +- nss_setpwent(); ++ nss_setpwent2(); + /* loop over all users */ + while ((pwd = nss_getpwent())) { + printf("Testing user %s\n", pwd->pw_name); +@@ -424,14 +424,14 @@ + printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid); + printf("\n"); + } +- nss_endpwent(); ++ nss_endpwent2(); + } + + static void nss_test_groups(void) + { + struct group *grp; + +- nss_setgrent(); ++ nss_setgrent2(); + /* loop over all groups */ + while ((grp = nss_getgrent())) { + printf("Testing group %s\n", grp->gr_name); +@@ -452,7 +452,7 @@ + printf("getgrgid: "); print_group(grp); + printf("\n"); + } +- nss_endgrent(); ++ nss_endgrent2(); + } + + static void nss_test_errors(void) diff --git a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.11.13-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.11.13-r1.ebuild index 616a3c56f8..f5d8d1dc67 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.11.13-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.11.13-r1.ebuild @@ -124,6 +124,7 @@ S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}/${PN}-4.4.0-pam.patch" "${FILESDIR}/${PN}-4.9.2-timespec.patch" + "${FILESDIR}/${PN}-4.11-fix-glibc-2.32-function-collisions.patch" "${FILESDIR}/${PN}-4.13-winexe_option.patch" "${FILESDIR}/${PN}-4.13-vfs_snapper_configure_option.patch" )