Commits (1)
  • Deucе's avatar
    typedef a socket_buffer_t · 3f08e8f6
    Deucе authored
    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.
    3f08e8f6
......@@ -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 */
......