From: Gurucharan Shetty Date: Wed, 19 Feb 2014 20:41:04 +0000 (-0800) Subject: socket-util: af_inet_ioctl() for Windows. X-Git-Tag: sliver-openvswitch-2.1.90-1~1^2~16 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=866f3e677e21a617c390737a6e90ff62022f8747 socket-util: af_inet_ioctl() for Windows. There is no direct mapping for the ioctl function in Windows. As of now, af_inet_ioctl() is being used for Linux and BSD. So, don't try to compile it for Windows. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/socket-util.c b/lib/socket-util.c index 861cd9d99..20caddd9a 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -1267,6 +1267,7 @@ describe_fd(int fd) return ds_steal_cstr(&string); } +#ifndef _WIN32 /* Calls ioctl() on an AF_INET sock, passing the specified 'command' and * 'arg'. Returns 0 if successful, otherwise a positive errno value. */ int @@ -1305,6 +1306,7 @@ af_inet_ifreq_ioctl(const char *name, struct ifreq *ifr, unsigned long int cmd, } return error; } +#endif /* sockaddr_storage helpers. */ diff --git a/lib/socket-util.h b/lib/socket-util.h index 126f730f6..1695985bd 100644 --- a/lib/socket-util.h +++ b/lib/socket-util.h @@ -74,11 +74,13 @@ char *describe_fd(int fd); * in is used. */ #define DSCP_DEFAULT (IPTOS_PREC_INTERNETCONTROL >> 2) +#ifndef _WIN32 /* Helpers for calling ioctl() on an AF_INET socket. */ struct ifreq; int af_inet_ioctl(unsigned long int command, const void *arg); int af_inet_ifreq_ioctl(const char *name, struct ifreq *, unsigned long int cmd, const char *cmd_name); +#endif /* Functions for working with sockaddr_storage that might contain an IPv4 or * IPv6 address. */