From 24a7649626aa3d10a185f7cda6505e872daaf4a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Sun, 20 Feb 2022 00:52:53 -0500
Subject: [PATCH] Fix socket_ioctl_ptr_t

On Win32 it can't be defined until after winsock*.h is #included.
On everything else, it needs to be a pointer.
---
 src/xpdev/sockwrap.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xpdev/sockwrap.h b/src/xpdev/sockwrap.h
index da2713ffcd..5e7615586e 100644
--- a/src/xpdev/sockwrap.h
+++ b/src/xpdev/sockwrap.h
@@ -30,7 +30,6 @@
 #if defined(_WIN32)	/* Use WinSock */
 typedef const char* socket_send_buffer_t;
 typedef char* socket_recv_buffer_t;
-typedef u_long* socket_ioctl_ptr_t;
 
 #ifndef _WINSOCKAPI_
 	#include <winsock2.h>	/* socket/bind/etc. */
@@ -51,11 +50,12 @@ typedef u_long* socket_ioctl_ptr_t;
 #ifndef MSG_WAITALL
 #define MSG_WAITALL 0x08
 #endif
+typedef u_long* socket_ioctl_ptr_t;
 
 #elif defined __unix__		/* Unix-variant */
 typedef const void* socket_send_buffer_t;
 typedef void* socket_recv_buffer_t;
-typedef int socket_ioctl_ptr_t;
+typedef int* socket_ioctl_ptr_t;
 
 #include <netdb.h>			/* gethostbyname */
 #include <sys/types.h>		/* For u_int32_t on FreeBSD */
-- 
GitLab