Hello everybody! To clarify my problem reported last week: My program lists #include <arpa/inet.h> #include <netinet/in.h> #include <netinet/ip.h> #include <netdb.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/wait.h> #include <ctype.h> #include <fcntl.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/uio.h> #include <sys/utsname.h> #include <sys/unistd.h> #include <stdarg.h> #include <unistd.h> #include <errno.h> which works with Linux and AIX.
If I try this with cygwin it compiles, but upon call it says setsockopt(IP_MULTICAST_LOOP) errno=14 (Bad address) The offending part is char c; c=0; if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, (void*)&c, sizeof(c))) ERROR("setsockopt(IP_MULTICAST_LOOP)"); After changing the "char" to an "int" I get setsockopt(IP_MULTICAST_LOOP) errno=109 (This option is unsupported) Which I think after reading in some .h files is because it uses winsock 1.1. As I found ws2tcpip.h I try to include that via #ifdef __WIN32__ #include <w32api/ws2tcpip.h> #endif either before or after the above #include lines. But I get a lot of "conflicting types for xxx" in netdb.h, sys/socket.h, asm/byteorder.h, and even cygwin/in.h:25: parse error before '0' Any help how to use the definitions from ws2tcpip.h? Thank you! Regards Phil - This message is RSA-encrypted: n=33389, e=257 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/