[asterisk-commits] rizzo: trunk r93464 - /trunk/channels/chan_unistim.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 17 17:10:35 CST 2007


Author: rizzo
Date: Mon Dec 17 17:10:35 2007
New Revision: 93464

URL: http://svn.digium.com/view/asterisk?view=rev&rev=93464
Log:
fix building under cygwin.

At this point WINARCH should go away.


Modified:
    trunk/channels/chan_unistim.c

Modified: trunk/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=93464&r1=93463&r2=93464
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Dec 17 17:10:35 2007
@@ -40,6 +40,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"




More information about the asterisk-commits mailing list