summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar David Crosby2016-07-14 03:29:34 +0200
committerGravatar Nikias Bassen2016-07-14 03:29:34 +0200
commit8e6ce39679451f35a6ff1edae7bd2212fc2849ae (patch)
treeb07ddbc07cd77506cdfff7d568f74fac692b3ff5 /src
parent73d35f2caf7c26a79ade3ff830dbb71197af26af (diff)
downloadlibusbmuxd-8e6ce39679451f35a6ff1edae7bd2212fc2849ae.tar.gz
libusbmuxd-8e6ce39679451f35a6ff1edae7bd2212fc2849ae.tar.bz2
Move EBADMSG and EPROTO defines out of the WIN32 ifdef
Fixes compilation on OpenBSD, which surprisingly doesn't have them
Diffstat (limited to 'src')
-rw-r--r--src/libusbmuxd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 485857b..8003730 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -40,16 +40,17 @@
#endif
#endif
-#ifdef WIN32
-#include <winsock2.h>
-#include <windows.h>
-#define sleep(x) Sleep(x*1000)
#ifndef EPROTO
#define EPROTO 134
#endif
#ifndef EBADMSG
#define EBADMSG 104
#endif
+
+#ifdef WIN32
+#include <winsock2.h>
+#include <windows.h>
+#define sleep(x) Sleep(x*1000)
#else
#include <sys/socket.h>
#include <arpa/inet.h>