Package: pike8.0 / 8.0.702-1

undefined_htons.patch Patch series | download
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
42
43
44
45
46
47
48
49
50
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
@@ -11,7 +11,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
@@ -33,6 +33,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
@@ -9,6 +9,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
 
@@ -24,6 +27,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