summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-09-28 20:55:34 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-09-29 00:17:53 -0400
commit8f0b320d0db1beb60f0a124d07a280cd2e330fa2 (patch)
tree0a4906545bacf9b284bc0b54b8546d6f65bac0e4 /www-apache
parentapp-benchmarks/bonnie: fix build with clang16 (diff)
downloadgentoo-8f0b320d0db1beb60f0a124d07a280cd2e330fa2.tar.gz
gentoo-8f0b320d0db1beb60f0a124d07a280cd2e330fa2.tar.bz2
gentoo-8f0b320d0db1beb60f0a124d07a280cd2e330fa2.zip
www-apache/pwauth: fix build with clang
Fixes both issues with clang16 and older clang depending on USE. These fixes exist upstream and in a PR, but does not seem to be any activity anymore. Revbump given may help with potential runtime issues on other compilers. Closes: https://bugs.gentoo.org/870631 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'www-apache')
-rw-r--r--www-apache/pwauth/files/pwauth-2.3.10-clang.patch39
-rw-r--r--www-apache/pwauth/files/pwauth-2.3.10-warnings.patch51
-rw-r--r--www-apache/pwauth/pwauth-2.3.10-r2.ebuild (renamed from www-apache/pwauth/pwauth-2.3.10-r1.ebuild)4
3 files changed, 93 insertions, 1 deletions
diff --git a/www-apache/pwauth/files/pwauth-2.3.10-clang.patch b/www-apache/pwauth/files/pwauth-2.3.10-clang.patch
new file mode 100644
index 000000000000..ac241b465dde
--- /dev/null
+++ b/www-apache/pwauth/files/pwauth-2.3.10-clang.patch
@@ -0,0 +1,39 @@
+Minimal additional fixes for with both clang16 and older clang.
+
+https://bugs.gentoo.org/870631
+See also: https://github.com/phokz/pwauth/pull/13
+--- a/auth_sun.c
++++ b/auth_sun.c
+@@ -33,2 +33,3 @@
+
++#include <time.h>
+ #include "pwauth.h"
+--- a/fail_log.c
++++ b/fail_log.c
+@@ -33,2 +33,3 @@
+
++#include <time.h>
+ #include "pwauth.h"
+@@ -72,3 +73,3 @@
+
+-void log_failure()
++void log_failure(void)
+ {
+@@ -151,3 +152,3 @@
+
+-log_failure()
++void log_failure(void)
+ {
+--- a/nologin.c
++++ b/nologin.c
+@@ -40,3 +40,3 @@
+
+-check_nologin()
++int check_nologin(void)
+ {
+--- a/pwauth.h
++++ b/pwauth.h
+@@ -133 +133,3 @@
+ int check_auth(char *login, char *passwd);
++int check_nologin(void);
++void log_failure(void);
diff --git a/www-apache/pwauth/files/pwauth-2.3.10-warnings.patch b/www-apache/pwauth/files/pwauth-2.3.10-warnings.patch
new file mode 100644
index 000000000000..29faff3e0e9c
--- /dev/null
+++ b/www-apache/pwauth/files/pwauth-2.3.10-warnings.patch
@@ -0,0 +1,51 @@
+Backport to fix some clang16 issues.
+https://bugs.gentoo.org/870631
+
+https://github.com/phokz/pwauth/commit/c1e7fd9af0
+From: Philip Prindeville <philipp@redfish-solutions.com>
+Date: Mon, 23 Jul 2018 13:41:47 -0600
+Subject: [PATCH] Quiet compiler warnings for signatures
+
+There are missing/incomplete function declarations. Also a missing
+header.
+--- a/lastlog.c
++++ b/lastlog.c
+@@ -31,6 +31,8 @@
+ * =======================================================================
+ */
+
++#include <time.h>
++
+ #include "pwauth.h"
+
+ /* LASTLOG - update the system's lastlog */
+--- a/main.c
++++ b/main.c
+@@ -44,6 +44,7 @@ int server_uids[]= {SERVER_UIDS, 0};
+ #endif
+
+
++int
+ main(int argc, char **argv)
+ {
+ #ifdef ENV_METHOD
+--- a/pwauth.h
++++ b/pwauth.h
+@@ -127,3 +127,7 @@ extern int haveuid;
+ #ifndef BFSZ
+ # define BFSZ 1024
+ #endif
++
++void snooze(int seconds);
++void lastlog(void);
++int check_auth(char *login, char *passwd);
+--- a/snooze.c
++++ b/snooze.c
+@@ -42,6 +42,7 @@
+ * sleep time, if other pwauth processes are in sleeps.
+ */
+
++void
+ snooze(int seconds)
+ {
+ int slfd;
diff --git a/www-apache/pwauth/pwauth-2.3.10-r1.ebuild b/www-apache/pwauth/pwauth-2.3.10-r2.ebuild
index 99e0dfdf3fe0..a99fff7b1ff0 100644
--- a/www-apache/pwauth/pwauth-2.3.10-r1.ebuild
+++ b/www-apache/pwauth/pwauth-2.3.10-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -22,6 +22,8 @@ PATCHES=(
"${FILESDIR}/${P}-config.patch"
"${FILESDIR}/${P}-makefile.patch"
"${FILESDIR}/${PN}-strchr.patch"
+ "${FILESDIR}/${P}-warnings.patch"
+ "${FILESDIR}/${P}-clang.patch"
)
pkg_setup() {