1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00
freebsd-ports/dns/idnkit/files/patch-configure
Hajimu UMEMOTO b583668228 Make it buildable on RELENG_6 after correction of the 2nd argument
of gethostbyaddr(3).

Reported by:	pointyhat via kris
2006-09-03 12:31:09 +00:00

55 lines
1.3 KiB
Plaintext

Index: configure
diff -u configure.orig configure
--- configure.orig Tue Mar 11 08:53:20 2003
+++ configure Sun Sep 3 21:07:20 2006
@@ -2633,7 +2644,37 @@
ac_cv_flavor_gethostbyaddr=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 2637 "configure"
+#line 2648 "configure"
+#include "confdefs.h"
+
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ struct hostent *gethostbyaddr(const void *addr, int len, int type) {
+ return NULL;
+ }
+ int main() {
+ (void)gethostbyaddr(NULL, 0, 0);
+ return 0;
+ }
+
+EOF
+if { (eval echo configure:2664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_flavor_gethostbyaddr=freebsd6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -fr conftest*
+fi
+
+ if test "$cross_compiling" = yes; then
+ ac_cv_flavor_gethostbyaddr=unknown
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2678 "configure"
#include "confdefs.h"
#include <stddef.h>
@@ -2675,6 +2716,10 @@
ac_cv_type_ghba_addr_t='const char *'
ac_cv_type_ghba_addrlen_t='size_t'
;;
+ freebsd6)
+ ac_cv_type_ghba_addr_t='const void *'
+ ac_cv_type_ghba_addrlen_t='int'
+ ;;
traditional | none)
ac_cv_type_ghba_addr_t='const char *'
ac_cv_type_ghba_addrlen_t='int'