pkgsrc/net/dante/patches/patch-ab
2007-05-23 11:12:35 +00:00

54 lines
1.1 KiB
Text

$NetBSD: patch-ab,v 1.9 2007/05/23 11:12:35 sketch Exp $
--- configure.orig 2006-01-16 11:49:45.000000000 +0000
+++ configure 2007-05-23 10:56:06.000000000 +0100
@@ -19251,7 +19251,6 @@
echo "${ECHO_T}no" >&6
#autoconf_compflags is set to "-g -O2" with GCC
#override CFLAGS when running configure to avoid this
- CFLAGS="$CFLAGS $autoconf_compflags"
fi
#-Wall ?
@@ -25124,8 +25123,13 @@
#include <netdb.h>
#include <unistd.h>
+#if defined(__DragonFly__)
struct hostent *
gethostbyaddr( const char *, int, int
+#else
+struct hostent *
+gethostbyaddr( const char *, socklen_t, int
+#endif
);
int
main ()
@@ -25166,9 +25170,18 @@
#define HAVE_PROT_GETHOSTBYADDR_1 const char *
_ACEOF
-cat >>confdefs.h <<_ACEOF
+case "$host_os" in
+dragonfly*)
+ cat >>confdefs.h <<_ACEOF
#define HAVE_PROT_GETHOSTBYADDR_2 int
_ACEOF
+;;
+*)
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PROT_GETHOSTBYADDR_2 socklen_t
+_ACEOF
+;;
+esac
cat >>confdefs.h <<_ACEOF
#define HAVE_PROT_GETHOSTBYADDR_3 int
@@ -35245,6 +35258,6 @@
fi
VINFO=README.latest
-test -s "$VINFO" && cat "$VINFO"
+test -s "$VINFO" && cat "$VINFO" || true
exit 0