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

typedef a socket_buffer_t

This is so we can deal with send(), recv() and friends taking
a void* on BSD stacks, and a char* on Win32.

Not a big deal for C where a void* is universal, but C++ hates that
type of thing.
parent eb806b4a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2744 passed
......@@ -28,6 +28,7 @@
/* OS-specific */
/***************/
#if defined(_WIN32) /* Use WinSock */
typedef char* socket_buffer_t;
#ifndef _WINSOCKAPI_
#include <winsock2.h> /* socket/bind/etc. */
......@@ -50,7 +51,8 @@
#endif
#elif defined __unix__ /* Unix-variant */
typedef void* socket_buffer_t;
#include <netdb.h> /* gethostbyname */
#include <sys/types.h> /* For u_int32_t on FreeBSD */
#include <netinet/in.h> /* IPPROTO_IP */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment