From 3a86f14adefaed32f83737b359f80d80f28eec53 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Mon, 28 Aug 2023 07:00:57 -0700 Subject: [PATCH] security/pam-modules: Fix build with LLVM15, assume maintainership Fix: pam_innetgr.c:134:16: error: incompatible function pointer types passing 'int (char *, int)' to parameter of type 'int (*)(char *, size_t)' (aka 'int (*)(char *, unsigned long)') [-Wincompatible-function-pointer-types] if (xgetname(getdomainname, &domainname)) { ^~~~~~~~~~~~~ pam_innetgr.c:65:16: note: passing argument to parameter 'getfn' here xgetname(int (*getfn)(char *, size_t), char **storage) ^ 1 warning and 1 error generated. *** [pam_innetgr.lo] Error code 1 While at it assume maintainership. --- security/pam-modules/Makefile | 2 +- .../files/patch-pam__innetgr_pam__innetgr.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c diff --git a/security/pam-modules/Makefile b/security/pam-modules/Makefile index db1b98305174..f6ddc291a0a7 100644 --- a/security/pam-modules/Makefile +++ b/security/pam-modules/Makefile @@ -3,7 +3,7 @@ PORTVERSION= 2.5 CATEGORIES= security MASTER_SITES= ftp://download.gnu.org.ua/pub/release/pam-modules/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= cy@FreeBSD.org COMMENT= Collection of modules for PAM WWW= https://puszcza.gnu.org.ua/software/pam-modules/pam-modules.html diff --git a/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c b/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c new file mode 100644 index 000000000000..8d0193e20744 --- /dev/null +++ b/security/pam-modules/files/patch-pam__innetgr_pam__innetgr.c @@ -0,0 +1,11 @@ +--- pam_innetgr/pam_innetgr.c.orig 2022-02-04 07:04:47.000000000 -0800 ++++ pam_innetgr/pam_innetgr.c 2023-08-28 06:57:10.213329000 -0700 +@@ -131,7 +131,7 @@ + return -1; + #if HAVE_GETDOMAINNAME + if (use_getdomainname) { +- if (xgetname(getdomainname, &domainname)) { ++ if (xgetname((long int *) getdomainname, &domainname)) { + _pam_log(LOG_ERR, "getdomainname: %s", strerror(errno)); + } else if (strcmp (domainname, "(none)") == 0) { + free(domainname);