Commit 9c8fe7aa authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Do not define constant manually without platform check!

(and even, it pretty much sucks as we have seen already)
Should fix compilation on FreeBSD+glibc.
parent 1e8c1d91
......@@ -38,29 +38,20 @@
# include <winsock2.h>
# include <ws2tcpip.h>
# define if_nametoindex( str ) atoi( str )
#else
# include <sys/types.h>
# include <unistd.h>
# include <netdb.h> /* hostent ... */
# include <sys/socket.h>
# include <netinet/in.h>
# include <net/if.h>
#endif
#include "network.h"
#if defined(WIN32)
static const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
# define close closesocket
#endif
#ifndef MCAST_JOIN_SOURCE_GROUP
# ifdef WIN32
/*
* I hate manual definitions: Error-prone. Portability hell.
* Developers shall use UP-TO-DATE compilers. Full point.
* If you remove the warning, you remove the whole ifndef.
*/
# warning Your C headers are out-of-date. Please update.
/* Most (all?) Mingw32 versions in use are yet to pick up Vista stuff */
# define MCAST_JOIN_SOURCE_GROUP 45 /* from <ws2ipdef.h> */
# else
# define MCAST_JOIN_SOURCE_GROUP 46
# endif
struct group_source_req
{
uint32_t gsr_interface; /* interface index */
......@@ -69,6 +60,17 @@ struct group_source_req
};
#endif
#else
# include <sys/types.h>
# include <unistd.h>
# include <netdb.h> /* hostent ... */
# include <sys/socket.h>
# include <netinet/in.h>
# include <net/if.h>
#endif
#include "network.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment