From 866f3e677e21a617c390737a6e90ff62022f8747 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Wed, 19 Feb 2014 12:41:04 -0800 Subject: [PATCH] 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 --- lib/socket-util.c | 2 ++ lib/socket-util.h | 2 ++ 2 files changed, 4 insertions(+) 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. */ -- 2.43.0