aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2024-03-17 23:02:05 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2024-03-17 23:05:18 +0000
commitbe487aebb9446495178c06f525a2e77987ae4352 (patch)
tree7a089f2aba04c95c0fd818fa68ab4d2c1ebbfac0
parent15d06710eb8492b0eb687641ac96faf6ac7d2ea2 (diff)
downloadports-be487aebb9446495178c06f525a2e77987ae4352.tar.gz
ports-be487aebb9446495178c06f525a2e77987ae4352.zip
x11/xfce4-screensaver: Fix build when PAM option is off
When PAM option is off a different file is compiled, which, since version 4.18.3, tries to include crypt.h. Such file is not present in FreeBSD. The relevant definitions are in unistd.h. Fix by adding ifdef to skip such problematic include. Reported upstream: https://gitlab.xfce.org/apps/xfce4-screensaver/-/merge_requests/29 PR: 277763
-rw-r--r--x11/xfce4-screensaver/files/patch-src_gs-auth-pwent.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/x11/xfce4-screensaver/files/patch-src_gs-auth-pwent.c b/x11/xfce4-screensaver/files/patch-src_gs-auth-pwent.c
new file mode 100644
index 000000000000..65dcf88e7068
--- /dev/null
+++ b/x11/xfce4-screensaver/files/patch-src_gs-auth-pwent.c
@@ -0,0 +1,19 @@
+--- src/gs-auth-pwent.c.orig 2023-03-20 15:38:27 UTC
++++ src/gs-auth-pwent.c
+@@ -37,10 +37,12 @@
+ # include <unistd.h>
+ #endif
+
+-#ifdef HAVE_LIBCRYPT
+-# include <crypt.h>
+-#else
+-# define crypt(a, b) NULL
++#if !defined(__FreeBSD__)
++# ifdef HAVE_LIBCRYPT
++# include <crypt.h>
++# else
++# define crypt(a, b) NULL
++# endif
+ #endif
+
+ #ifdef __bsdi__