[Icecast-dev] [PATCH] Fix: test arpa/inet.h presence before using it
Jean-Baptiste Kempf
jb at videolan.org
Mon Nov 30 09:19:26 PST 2015
This fixes the Windows build.
---
configure.ac | 2 +-
src/proto_roaraudio.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c4d5ad6..c43774a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,7 @@ dnl Checks for programs.
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
-AC_CHECK_HEADERS([strings.h sys/timeb.h])
+AC_CHECK_HEADERS([strings.h sys/timeb.h arpa/inet.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
diff --git a/src/proto_roaraudio.c b/src/proto_roaraudio.c
index 4af8102..bd285fe 100644
--- a/src/proto_roaraudio.c
+++ b/src/proto_roaraudio.c
@@ -28,7 +28,9 @@
#endif
/* for htonl(). */
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
--
2.6.2
More information about the Icecast-dev
mailing list