From b25eff91f337c19a1f3fbd17daa47ec4c1d11e3a Mon Sep 17 00:00:00 2001 From: Krul Ceter Date: Sun, 20 Nov 2022 06:10:58 +0300 Subject: [PATCH] xdm: fix build with glibc 2.36 --- srcpkgs/xdm/patches/glibc-2.36.patch | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 srcpkgs/xdm/patches/glibc-2.36.patch diff --git a/srcpkgs/xdm/patches/glibc-2.36.patch b/srcpkgs/xdm/patches/glibc-2.36.patch new file mode 100644 index 000000000000..7f0166dcf701 --- /dev/null +++ b/srcpkgs/xdm/patches/glibc-2.36.patch @@ -0,0 +1,36 @@ +From 468b76023a2dfb750c4d5e9b184f230c5b6ec670 Mon Sep 17 00:00:00 2001 +From: Callum Farmer +Date: Sun, 11 Sep 2022 12:57:05 +0100 +Subject: [PATCH] genauth: fix build with arc4random in glibc 2.36 + +HAVE_ARC4RANDOM is defined under glibc 2.36 but this will attempt to include + from libbsd instead of from glibc + +Signed-off-by: Callum Farmer +--- + xdm/genauth.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/xdm/genauth.c b/xdm/genauth.c +index 38a0215..de7abfc 100644 +--- a/xdm/genauth.c ++++ b/xdm/genauth.c +@@ -42,7 +42,15 @@ from The Open Group. + + #ifdef HAVE_ARC4RANDOM + # ifdef __linux__ +-# include ++# if defined(__GLIBC__) && defined(__GLIBC_PREREQ) ++# if __GLIBC_PREREQ(2, 36) ++# include ++# else ++# include ++# endif ++# else ++# include ++# endif + # else + # include + # endif +-- +GitLab