Skip to content
Snippets Groups Projects
Commit 24a76496 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

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.
parent 1d7b9805
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2748 passed
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#if defined(_WIN32) /* Use WinSock */ #if defined(_WIN32) /* Use WinSock */
typedef const char* socket_send_buffer_t; typedef const char* socket_send_buffer_t;
typedef char* socket_recv_buffer_t; typedef char* socket_recv_buffer_t;
typedef u_long* socket_ioctl_ptr_t;
#ifndef _WINSOCKAPI_ #ifndef _WINSOCKAPI_
#include <winsock2.h> /* socket/bind/etc. */ #include <winsock2.h> /* socket/bind/etc. */
...@@ -51,11 +50,12 @@ typedef u_long* socket_ioctl_ptr_t; ...@@ -51,11 +50,12 @@ typedef u_long* socket_ioctl_ptr_t;
#ifndef MSG_WAITALL #ifndef MSG_WAITALL
#define MSG_WAITALL 0x08 #define MSG_WAITALL 0x08
#endif #endif
typedef u_long* socket_ioctl_ptr_t;
#elif defined __unix__ /* Unix-variant */ #elif defined __unix__ /* Unix-variant */
typedef const void* socket_send_buffer_t; typedef const void* socket_send_buffer_t;
typedef void* socket_recv_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 <netdb.h> /* gethostbyname */
#include <sys/types.h> /* For u_int32_t on FreeBSD */ #include <sys/types.h> /* For u_int32_t on FreeBSD */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment