diff --git a/libpurple/network.c b/libpurple/network.c
--- a/libpurple/network.c
+++ b/libpurple/network.c
@@ -29,7 +29,6 @@
 #include <resolv.h>
 #include <netinet/in.h>
 #include <net/if.h>
-#include <sys/ioctl.h>
 #else
 #include <nspapi.h>
 #endif
diff --git a/libpurple/protocols/zephyr/sysdep.h b/libpurple/protocols/zephyr/sysdep.h
--- a/libpurple/protocols/zephyr/sysdep.h
+++ b/libpurple/protocols/zephyr/sysdep.h
@@ -68,9 +68,6 @@ char *ttyname(void);
 #  ifdef HAVE_SGTTY_H
 #   include <sgtty.h>
 #  endif
-#  ifdef HAVE_SYS_IOCTL_H
-#   include <sys/ioctl.h>
-#  endif
 # endif
 #endif
 
diff --git a/libpurple/stun.c b/libpurple/stun.c
--- a/libpurple/stun.c
+++ b/libpurple/stun.c
@@ -26,7 +26,6 @@
 
 #ifndef _WIN32
 #include <net/if.h>
-#include <sys/ioctl.h>
 #endif
 
 #include <gio/gio.h>
diff --git a/libpurple/win32/libc_interface.h b/libpurple/win32/libc_interface.h
--- a/libpurple/win32/libc_interface.h
+++ b/libpurple/win32/libc_interface.h
@@ -49,10 +49,6 @@ G_BEGIN_DECLS
 #define getsockname( socket, addr, lenptr ) \
 wpurple_getsockname( socket, addr, lenptr )
 
-/* sys/ioctl.h */
-#define ioctl( fd, command, val ) \
-wpurple_ioctl( fd, command, val )
-
 /* fcntl.h */
 #define fcntl( fd, command, ... ) \
 wpurple_fcntl( fd, command, ##__VA_ARGS__ )
@@ -64,10 +60,6 @@ wpurple_gethostbyname( name )
 #define gethostname( name, size ) \
 wpurple_gethostname( name, size )
 
-/* sys/time.h */
-#define gettimeofday( timeval, timezone ) \
-wpurple_gettimeofday( timeval, timezone )
-
 /* stdio.h */
 #if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3 || \
 	!defined(IS_WIN32_CROSS_COMPILED)
diff --git a/libpurple/win32/libc_interface.c b/libpurple/win32/libc_interface.c
--- a/libpurple/win32/libc_interface.c
+++ b/libpurple/win32/libc_interface.c
@@ -98,59 +98,6 @@ int wpurple_fcntl(int socket, int comman
 	}/*end switch*/
 }
 
-/* sys/ioctl.h */
-int wpurple_ioctl(int fd, int command, void* val) {
-	switch( command ) {
-	case FIONBIO:
-	{
-		if (ioctlsocket(fd, FIONBIO, (unsigned long *)val) == SOCKET_ERROR) {
-			errno = WSAGetLastError();
-			return -1;
-		}
-		return 0;
-	}
-	case SIOCGIFCONF:
-	{
-		INTERFACE_INFO InterfaceList[20];
-		unsigned long nBytesReturned;
-		if (WSAIoctl(fd, SIO_GET_INTERFACE_LIST,
-				0, 0, &InterfaceList,
-				sizeof(InterfaceList), &nBytesReturned,
-				0, 0) == SOCKET_ERROR) {
-			errno = WSAGetLastError();
-			return -1;
-		} else {
-			int i;
-			struct ifconf *ifc = val;
-			char *tmp = ifc->ifc_buf;
-			int nNumInterfaces =
-				nBytesReturned / sizeof(INTERFACE_INFO);
-			for (i = 0; i < nNumInterfaces; i++) {
-				INTERFACE_INFO ii = InterfaceList[i];
-				struct ifreq *ifr = (struct ifreq *) tmp;
-				struct sockaddr_in *sa = (struct sockaddr_in *) &ifr->ifr_addr;
-
-				sa->sin_family = ii.iiAddress.AddressIn.sin_family;
-				sa->sin_port = ii.iiAddress.AddressIn.sin_port;
-				sa->sin_addr.s_addr = ii.iiAddress.AddressIn.sin_addr.s_addr;
-				tmp += sizeof(struct ifreq);
-
-				/* Make sure that we can fit in the original buffer */
-				if (tmp >= (ifc->ifc_buf + ifc->ifc_len + sizeof(struct ifreq))) {
-					break;
-				}
-			}
-			/* Replace the length with the actually used length */
-			ifc->ifc_len = ifc->ifc_len - (ifc->ifc_buf - tmp);
-			return 0;
-		}
-	}
-	default:
-		errno = EINVAL;
-		return -1;
-	}/*end switch*/
-}
-
 /* netdb.h */
 struct hostent* wpurple_gethostbyname(const char *name) {
 	struct hostent *hp;
diff --git a/libpurple/win32/libc_internal.h b/libpurple/win32/libc_internal.h
--- a/libpurple/win32/libc_internal.h
+++ b/libpurple/win32/libc_internal.h
@@ -38,10 +38,6 @@ int wpurple_fcntl(int socket, int comman
 #define F_SETFL 4
 #define O_NONBLOCK 04000
 
-/* sys/ioctl.h */
-#define SIOCGIFCONF 0x8912 /* get iface list */
-int wpurple_ioctl(int fd, int command, void* opt);
-
 /* net/if.h */
 struct ifreq
 {
@@ -72,17 +68,6 @@ struct ifconf
 # define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address.  */
 # define ifc_req ifc_ifcu.ifcu_req /* Array of structures.  */
 
-/* sys/time.h */
-#if __MINGW32_MAJOR_VERSION < 3 || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 10)
-struct timezone {
-	int tz_minuteswest;
-	int tz_dsttime;
-};
-#else
-#    include <sys/time.h>
-#endif
-int wpurple_gettimeofday(struct timeval *p, struct timezone *z);
-
 /* unistd.h */
 int wpurple_gethostname(char *name, size_t size);
 
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -688,7 +688,7 @@ foreach func : ['timegm']
 	conf.set('HAVE_' + func.to_upper(),
 	    compiler.has_function(func))
 endforeach
-foreach header : 'sgtty.h sys/cdefs.h sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h sys/select.h sys/wait.h termios.h'.split()
+foreach header : 'sgtty.h sys/cdefs.h sys/file.h sys/filio.h sys/msgbuf.h sys/select.h sys/wait.h termios.h'.split()
 	conf.set('HAVE_' + header.to_upper().underscorify(),
 	    compiler.has_header(header))
 endforeach
