summaryrefslogtreecommitdiffstats
path: root/src/libshout-1-fixes.patch
blob: e6077fa8f3f9b135aa8553e7319cb673a4e3473b (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 25255ff19813e122e6442518b29a55c15860d3a3 Mon Sep 17 00:00:00 2001
From: MXE
Date: Fri, 1 Oct 2010 17:20:29 +0200
Subject: [PATCH] mingw fixes


diff --git a/examples/nonblocking.c b/examples/nonblocking.c
index 0f4aa68..49a3d36 100644
--- a/examples/nonblocking.c
+++ b/examples/nonblocking.c
@@ -68,7 +68,11 @@ int main()
 
 	while (ret == SHOUTERR_BUSY) {
 	  printf("Connection pending. Sleeping...\n");
+#ifdef __MINGW32__
+	  Sleep(1000);
+#else
 	  sleep(1);
+#endif
 	  ret = shout_get_connected(shout);
 	}
 	
diff --git a/include/os.h b/include/os.h
index 7d065b3..d7ae425 100755
--- a/include/os.h
+++ b/include/os.h
@@ -1,7 +1,9 @@
 #ifdef _WIN32
+#ifndef __MINGW32__
 typedef __int64 int64_t;
 typedef unsigned __int64 uint64_t;
 typedef unsigned __int32 uint32_t;
 typedef __int32 int32_t;
 typedef int  ssize_t;
 #endif
+#endif
diff --git a/include/shout/shout.h.in b/include/shout/shout.h.in
index 43b0e7a..b026c10 100644
--- a/include/shout/shout.h.in
+++ b/include/shout/shout.h.in
@@ -23,8 +23,10 @@
 
 #include <sys/types.h>
 #ifdef WIN32
+#ifndef __MINGW32__
 #include <os.h>
 #endif
+#endif
 
 #define SHOUTERR_SUCCESS	(0)
 #define SHOUTERR_INSANE		(-1)
-- 
1.7.1