1 |
commit: 8f0b320d0db1beb60f0a124d07a280cd2e330fa2 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 29 00:55:34 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 04:17:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f0b320d |
7 |
|
8 |
www-apache/pwauth: fix build with clang |
9 |
|
10 |
Fixes both issues with clang16 and older clang depending on USE. |
11 |
These fixes exist upstream and in a PR, but does not seem to be |
12 |
any activity anymore. |
13 |
|
14 |
Revbump given may help with potential runtime issues on other |
15 |
compilers. |
16 |
|
17 |
Closes: https://bugs.gentoo.org/870631 |
18 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
19 |
|
20 |
www-apache/pwauth/files/pwauth-2.3.10-clang.patch | 39 +++++++++++++++++ |
21 |
.../pwauth/files/pwauth-2.3.10-warnings.patch | 51 ++++++++++++++++++++++ |
22 |
...th-2.3.10-r1.ebuild => pwauth-2.3.10-r2.ebuild} | 4 +- |
23 |
3 files changed, 93 insertions(+), 1 deletion(-) |
24 |
|
25 |
diff --git a/www-apache/pwauth/files/pwauth-2.3.10-clang.patch b/www-apache/pwauth/files/pwauth-2.3.10-clang.patch |
26 |
new file mode 100644 |
27 |
index 000000000000..ac241b465dde |
28 |
--- /dev/null |
29 |
+++ b/www-apache/pwauth/files/pwauth-2.3.10-clang.patch |
30 |
@@ -0,0 +1,39 @@ |
31 |
+Minimal additional fixes for with both clang16 and older clang. |
32 |
+ |
33 |
+https://bugs.gentoo.org/870631 |
34 |
+See also: https://github.com/phokz/pwauth/pull/13 |
35 |
+--- a/auth_sun.c |
36 |
++++ b/auth_sun.c |
37 |
+@@ -33,2 +33,3 @@ |
38 |
+ |
39 |
++#include <time.h> |
40 |
+ #include "pwauth.h" |
41 |
+--- a/fail_log.c |
42 |
++++ b/fail_log.c |
43 |
+@@ -33,2 +33,3 @@ |
44 |
+ |
45 |
++#include <time.h> |
46 |
+ #include "pwauth.h" |
47 |
+@@ -72,3 +73,3 @@ |
48 |
+ |
49 |
+-void log_failure() |
50 |
++void log_failure(void) |
51 |
+ { |
52 |
+@@ -151,3 +152,3 @@ |
53 |
+ |
54 |
+-log_failure() |
55 |
++void log_failure(void) |
56 |
+ { |
57 |
+--- a/nologin.c |
58 |
++++ b/nologin.c |
59 |
+@@ -40,3 +40,3 @@ |
60 |
+ |
61 |
+-check_nologin() |
62 |
++int check_nologin(void) |
63 |
+ { |
64 |
+--- a/pwauth.h |
65 |
++++ b/pwauth.h |
66 |
+@@ -133 +133,3 @@ |
67 |
+ int check_auth(char *login, char *passwd); |
68 |
++int check_nologin(void); |
69 |
++void log_failure(void); |
70 |
|
71 |
diff --git a/www-apache/pwauth/files/pwauth-2.3.10-warnings.patch b/www-apache/pwauth/files/pwauth-2.3.10-warnings.patch |
72 |
new file mode 100644 |
73 |
index 000000000000..29faff3e0e9c |
74 |
--- /dev/null |
75 |
+++ b/www-apache/pwauth/files/pwauth-2.3.10-warnings.patch |
76 |
@@ -0,0 +1,51 @@ |
77 |
+Backport to fix some clang16 issues. |
78 |
+https://bugs.gentoo.org/870631 |
79 |
+ |
80 |
+https://github.com/phokz/pwauth/commit/c1e7fd9af0 |
81 |
+From: Philip Prindeville <philipp@×××××××××××××××××.com> |
82 |
+Date: Mon, 23 Jul 2018 13:41:47 -0600 |
83 |
+Subject: [PATCH] Quiet compiler warnings for signatures |
84 |
+ |
85 |
+There are missing/incomplete function declarations. Also a missing |
86 |
+header. |
87 |
+--- a/lastlog.c |
88 |
++++ b/lastlog.c |
89 |
+@@ -31,6 +31,8 @@ |
90 |
+ * ======================================================================= |
91 |
+ */ |
92 |
+ |
93 |
++#include <time.h> |
94 |
++ |
95 |
+ #include "pwauth.h" |
96 |
+ |
97 |
+ /* LASTLOG - update the system's lastlog */ |
98 |
+--- a/main.c |
99 |
++++ b/main.c |
100 |
+@@ -44,6 +44,7 @@ int server_uids[]= {SERVER_UIDS, 0}; |
101 |
+ #endif |
102 |
+ |
103 |
+ |
104 |
++int |
105 |
+ main(int argc, char **argv) |
106 |
+ { |
107 |
+ #ifdef ENV_METHOD |
108 |
+--- a/pwauth.h |
109 |
++++ b/pwauth.h |
110 |
+@@ -127,3 +127,7 @@ extern int haveuid; |
111 |
+ #ifndef BFSZ |
112 |
+ # define BFSZ 1024 |
113 |
+ #endif |
114 |
++ |
115 |
++void snooze(int seconds); |
116 |
++void lastlog(void); |
117 |
++int check_auth(char *login, char *passwd); |
118 |
+--- a/snooze.c |
119 |
++++ b/snooze.c |
120 |
+@@ -42,6 +42,7 @@ |
121 |
+ * sleep time, if other pwauth processes are in sleeps. |
122 |
+ */ |
123 |
+ |
124 |
++void |
125 |
+ snooze(int seconds) |
126 |
+ { |
127 |
+ int slfd; |
128 |
|
129 |
diff --git a/www-apache/pwauth/pwauth-2.3.10-r1.ebuild b/www-apache/pwauth/pwauth-2.3.10-r2.ebuild |
130 |
similarity index 94% |
131 |
rename from www-apache/pwauth/pwauth-2.3.10-r1.ebuild |
132 |
rename to www-apache/pwauth/pwauth-2.3.10-r2.ebuild |
133 |
index 99e0dfdf3fe0..a99fff7b1ff0 100644 |
134 |
--- a/www-apache/pwauth/pwauth-2.3.10-r1.ebuild |
135 |
+++ b/www-apache/pwauth/pwauth-2.3.10-r2.ebuild |
136 |
@@ -1,4 +1,4 @@ |
137 |
-# Copyright 1999-2021 Gentoo Authors |
138 |
+# Copyright 1999-2022 Gentoo Authors |
139 |
# Distributed under the terms of the GNU General Public License v2 |
140 |
|
141 |
EAPI=7 |
142 |
@@ -22,6 +22,8 @@ PATCHES=( |
143 |
"${FILESDIR}/${P}-config.patch" |
144 |
"${FILESDIR}/${P}-makefile.patch" |
145 |
"${FILESDIR}/${PN}-strchr.patch" |
146 |
+ "${FILESDIR}/${P}-warnings.patch" |
147 |
+ "${FILESDIR}/${P}-clang.patch" |
148 |
) |
149 |
|
150 |
pkg_setup() { |