pkgsrc/net/libbind/patches/patch-configure.in

59 lines
1.4 KiB
Text

$NetBSD: patch-configure.in,v 1.1 2014/05/11 10:16:40 obache Exp $
* treat DragonFly BSD as FreeBSD.
* prototype check for OpenBSD.
--- configure.in.orig 2009-03-05 01:37:04.000000000 +0000
+++ configure.in
@@ -1082,7 +1082,7 @@ case "$host" in
PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
PORT_DIR="port/cygwin";;
*-darwin*) PORT_DIR="port/darwin";;
- *-dragonfly*) PORT_DIR="port/dragonfly";;
+ *-dragonfly*) PORT_DIR="port/freebsd";;
*-osf*) PORT_DIR="port/decunix";;
*-freebsd*) PORT_DIR="port/freebsd";;
*-hpux9*) PORT_DIR="port/hpux9";;
@@ -2408,6 +2408,19 @@ int setprotoent_r (int, struct protoent_
PROTO_R_SET_RESULT="#define PROTO_R_SET_RESULT (0)"
PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN int"
,
+AC_TRY_COMPILE(
+[
+#undef _REENTRANT
+#define _REENTRANT
+#undef __USE_MISC
+#define __USE_MISC
+#include <netdb.h>
+void setprotoent_r (int, struct protoent_data *);
+],[],
+PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
+PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
+,
+)
)
)
,
@@ -2692,6 +2705,22 @@ SERV_R_SET_RESULT="#define SERV_R_SET_RE
SERV_R_SET_RETURN="#define SERV_R_SET_RETURN int"
]
,
+AC_TRY_COMPILE(
+[
+#undef _REENTRANT
+#define _REENTRANT
+#undef __USE_MISC
+#define __USE_MISC
+#include <netdb.h>
+void setservent_r(int, struct servent_data *);
+]
+,,
+[
+SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
+SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
+]
+,
+)
)
)
,