Commit 3f08e8f6 authored by Deucе's avatar Deucе 👌🏾
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
Pipeline #2744 passed with stage
in 9 minutes and 55 seconds
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment