Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 181 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

Description: Include the necessary header file declaring htons() in Protocols.DNS_SD.

--- a/src/modules/_Protocols_DNS_SD/configure.in
+++ b/src/modules/_Protocols_DNS_SD/configure.in
@@ -12,7 +12,7 @@ if test x$with_dnssd = xyes ; then
 
   PIKE_FEATURE(DNS-SD,[no (dns_sd.h or howl.h not found)])
 
-  AC_CHECK_HEADERS(dns_sd.h howl.h)
+  AC_CHECK_HEADERS(dns_sd.h howl.h netinet/in.h arpa/inet.h)
   
   if test x$ac_cv_header_dns_sd_h = xyes; then
     PIKE_FEATURE(DNS-SD,[no (libdns_sd not found)])
--- a/src/modules/_Protocols_DNS_SD/sd.c
+++ b/src/modules/_Protocols_DNS_SD/sd.c
@@ -34,6 +34,12 @@
 
 #include <signal.h>
 
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */
 
 #ifdef THIS
 #undef THIS
--- a/src/modules/_Protocols_DNS_SD/config.h.in
+++ b/src/modules/_Protocols_DNS_SD/config.h.in
@@ -10,6 +10,9 @@
 #define PROTOCOLS_DNS_SD_H
 
 
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
 /* Define to 1 if you have the <dns_sd.h> header file. */
 #undef HAVE_DNS_SD_H
 
@@ -25,6 +28,9 @@
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
--- a/src/modules/_Protocols_DNS_SD/configure
+++ b/src/modules/_Protocols_DNS_SD/configure
@@ -3616,7 +3616,7 @@ done
 
 
 
-for ac_header in dns_sd.h howl.h
+for ac_header in dns_sd.h howl.h netinet/in.h arpa/inet.h
 do
 
 
@@ -3769,7 +3769,7 @@ fi
 done
 
   else
-    for ac_hdr in dns_sd.h howl.h
+    for ac_hdr in dns_sd.h howl.h netinet/in.h arpa/inet.h
     do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
       eval "ac_cv_header_$ac_safe=yes"