aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_unistim.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-17 23:10:35 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-17 23:10:35 +0000
commit8b9bfa2c8fa03ceb56e2a9b3e43610f3312b90ca (patch)
treeaf4a36aaaa10a47c548d96545c2fc0128de886ee /channels/chan_unistim.c
parent460f9e362ce76eca89e60db5a8475afa41963b98 (diff)
fix building under cygwin.
At this point WINARCH should go away. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93464 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_unistim.c')
-rw-r--r--channels/chan_unistim.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 09f5b617f..1ee208abb 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -41,6 +41,20 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/stat.h>
+#if defined(__CYGWIN__)
+/*
+ * cygwin headers are partly inconsistent. struct iovec is defined in sys/uio.h
+ * which is not included by default by sys/socket.h - in_pktinfo is defined in
+ * w32api/ws2tcpip.h but this probably has compatibility problems with sys/socket.h
+ * So for the time being we simply disable HAVE_PKTINFO when building under cygwin.
+ * This should be done in some common header, but for now this is the only file
+ * using iovec and in_pktinfo so it suffices to apply the fix here.
+ */
+#ifdef HAVE_PKTINFO
+#undef HAVE_PKTINFO
+#endif
+#endif /* __CYGWIN__ */
+
#include "asterisk/paths.h" /* ast_config_AST_LOG_DIR used in (too ?) many places */
#include "asterisk/network.h"
#include "asterisk/channel.h"