summaryrefslogtreecommitdiff
path: root/sys-auth/pam_ssh_agent_auth/files/pam_ssh_agent_auth-0.10.4-0002-Add-missing-includes-implicit-function-declarations.patch
blob: dda8c88128f6be47e38083d59c432d595ba8e3e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
https://github.com/jbeverly/pam_ssh_agent_auth/pull/41

From a12729d18c7ddeae9781a20155d5db1396e9e954 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 30 Sep 2022 20:54:45 +0100
Subject: [PATCH 2/2] Add missing includes (implicit function declarations)

This fixes building with Clang 16.

Bug: https://bugs.gentoo.org/870721
Closes: https://github.com/jbeverly/pam_ssh_agent_auth/pull/36
Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -388,6 +388,7 @@ case "$host" in
 	    [AC_LANG_SOURCE([[
 #define testmacro foo
 #define testmacro bar
+#include <stdlib.h>
 int main(void) { exit(0); }
 	    ]])],
 	    [ AC_MSG_RESULT(yes) ],
@@ -500,6 +501,7 @@ int main(void) { exit(0); }
 	AC_DEFINE(HAVE_BUNDLE, 1, [Define if your system uses bundles instead of ELF shared objects])
 	AC_MSG_CHECKING(if we have working getaddrinfo)
 	AC_TRY_RUN([#include <mach-o/dyld.h>
+#include <stdlib.h>
 int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
 		exit(0);
 	else
@@ -918,6 +920,7 @@ AC_MSG_CHECKING(compiler and flags for sanity)
 AC_RUN_IFELSE(
 	[AC_LANG_SOURCE([
 #include <stdio.h>
+#include <stdlib.h>
 int main(){exit(0);}
 	])],
 	[	AC_MSG_RESULT(yes) ],
@@ -944,6 +947,7 @@ AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
 				[AC_LANG_SOURCE([[
 #include <libgen.h>
 #include <string.h>
+#include <stdlib.h>
 
 int main(int argc, char **argv) {
     char *s, buf[32];
@@ -1102,6 +1106,7 @@ AC_RUN_IFELSE(
 	[AC_LANG_SOURCE([[
 #include <sys/types.h>
 #include <dirent.h>
+#include <stdlib.h>
 int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
 	]])],
 	[AC_MSG_RESULT(yes)],
@@ -1384,6 +1389,7 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then
 	AC_RUN_IFELSE(
 		[AC_LANG_SOURCE([[
 #include <stdio.h>
+#include <stdlib.h>
 int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
 		]])],
 		[AC_MSG_RESULT(yes)],
@@ -1408,6 +1414,7 @@ if test "x$ac_cv_func_asprintf" != "xyes" && \
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <stdlib.h>
 
 int x_snprintf(char *str,size_t count,const char *fmt,...)
 {
@@ -1496,6 +1503,7 @@ if test ! -z "$check_for_openpty_ctty_bug"; then
 #include <sys/fcntl.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <stdlib.h>
 
 int
 main()
@@ -1543,6 +1551,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
 	AC_RUN_IFELSE(
 		[AC_LANG_SOURCE([[
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/socket.h>
 #include <netdb.h>
 #include <errno.h>
@@ -1615,6 +1624,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
 	AC_RUN_IFELSE(
 		[AC_LANG_SOURCE([[
 #include <stdio.h>
+#include <stdlib.h>
 #include <sys/socket.h>
 #include <netdb.h>
 #include <errno.h>
@@ -1677,6 +1687,7 @@ if test "x$check_for_conflicting_getspnam" = "x1"; then
 	AC_COMPILE_IFELSE([AC_LANG_SOURCE(
 		[
 #include <shadow.h>
+#include <stdlib.h>
 int main(void) {exit(0);}
 		])],
 		[
@@ -1750,6 +1761,7 @@ AC_RUN_IFELSE(
 	[AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <openssl/opensslv.h>
 #define DATA "conftest.sslincver"
 int main(void) {
@@ -1785,6 +1797,7 @@ AC_RUN_IFELSE(
 	[AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <openssl/opensslv.h>
 #include <openssl/crypto.h>
 #define DATA "conftest.ssllibver"
@@ -1828,7 +1841,9 @@ AC_MSG_CHECKING([whether OpenSSL's headers match the library])
 AC_RUN_IFELSE(
 	[AC_LANG_SOURCE([[
 #include <string.h>
+#include <openssl/crypto.h>
 #include <openssl/opensslv.h>
+#include <stdlib.h>
 int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
 	]])],
 	[
@@ -1907,6 +1922,7 @@ AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
 AC_LINK_IFELSE(
 	[AC_LANG_SOURCE([[
 #include <string.h>
+#include <stdlib.h>
 #include <openssl/evp.h>
 int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
 	]])],
@@ -1952,6 +1968,7 @@ AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
 AC_RUN_IFELSE(
 	[AC_LANG_SOURCE([[
 #include <string.h>
+#include <stdlib.h>
 #include <openssl/rand.h>
 int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
 	]])],
@@ -2123,6 +2140,7 @@ if test -z "$have_llong_max"; then
 	AC_RUN_IFELSE(
 		[AC_LANG_SOURCE([[
 #include <stdio.h>
+#include <stdlib.h>
 /* Why is this so damn hard? */
 #ifdef __GNUC__
 # undef __GNUC__
@@ -2597,6 +2615,7 @@ dnl test snprintf (broken on SCO w/gcc)
 		[AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #ifdef HAVE_SNPRINTF
 int main()
 {
@@ -2740,6 +2759,7 @@ AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
 		ac_cv_have_accrights_in_msghdr, [
 	AC_COMPILE_IFELSE([AC_LANG_SOURCE(
 		[
+#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/uio.h>
@@ -2767,6 +2787,7 @@ AC_CACHE_CHECK([for msg_control field in struct msghdr],
 		ac_cv_have_control_in_msghdr, [
 	AC_COMPILE_IFELSE([AC_LANG_SOURCE(
 		[
+#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/uio.h>