File: missing-prototypes.patch

package info (click to toggle)
proxycheck 0.49a-9
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 376 kB
  • sloc: ansic: 4,461; sh: 748; makefile: 130
file content (41 lines) | stat: -rw-r--r-- 1,122 bytes parent folder | download | duplicates (2)
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
Author: Andreas Beckmann <anbe@debian.org>
Description: fix building with -Werror=implicit-function-declaration

--- a/configure
+++ b/configure
@@ -167,27 +167,31 @@ int main(int argc, char **argv) {
 EOF
 
 if ac_link "for socket routines" <<EOF
-int main() { connect(); accept(); return 0; }
+#include <sys/socket.h>
+int main() { connect(0, 0, 0); accept(0, 0, 0); return 0; }
 EOF
 then
   LIBSOCKET=
 else
   LIBSOCKET="-lsocket -lnsl"
   ac_link "for socket routines in $LIBSOCKET" "$LIBSOCKET" <<EOF || ac_error
-int main() { connect(); accept(); return 0; }
+#include <sys/socket.h>
+int main() { connect(0, 0, 0); accept(0, 0, 0); return 0; }
 EOF
 fi
 ac_subst LIBSOCKET
 
 if ac_link "for gethostbyname()" $LIBSOCKET <<EOF
-int main() { gethostbyname(); return 0; }
+#include <netdb.h>
+int main() { gethostbyname(0); return 0; }
 EOF
 then
   LIBRESOLV=
 else
   LIBRESOLV="-lresolv"
   ac_link "for gethostbyname() in $LIBRESOLV" "$LIBRESOLV $LIBSOCKET" <<EOF || ac_error
-int main() { gethostbyname(); return 0; }
+#include <netdb.h>
+int main() { gethostbyname(0); return 0; }
 EOF
 fi
 ac_subst LIBRESOLV