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
|