summaryrefslogtreecommitdiffstats
path: root/src/libshout-1-fixes.patch
blob: 083397dcf385b488209dafa1b4537f7b7be4ef02 (plain)
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
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Mon, 30 Nov 2015 17:19:26 +0100
Subject: [PATCH] Fix: test arpa/inet.h presence before using it

Fix: test arpa/inet.h presence before using it

This fixes the Windows build.

Taken from:
https://git.xiph.org/?p=icecast-libshout.git;a=commit;h=53aa028d13ac624e2c1e71796d529e773867d1d4

diff --git a/configure.ac b/configure.ac
index 1111111..2222222 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 1111111..2222222 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>