fnet.c

Simple C networking library
git clone git://git.finwo.net/lib/fnet.c
Log | Files | Refs | README

commit 04ed6866020673c335ca000881669c9610d1a006
parent bbd6e4591aad992730f852610e1f0c2d19bb809f
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Sun, 22 Oct 2023 22:15:09 +0200

Set socket type for windows

Diffstat:
Msrc/fnet.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/fnet.c b/src/fnet.c @@ -10,7 +10,7 @@ extern "C" { #include <fcntl.h> #include <sys/types.h> -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) #include "piscisaureus/wepoll.h" #include <sys/timeb.h> #include <winsock2.h> @@ -28,7 +28,11 @@ extern "C" { #include "fnet.h" +#if defined(_WIN32) || defined(_WIN64) +#define FNET_SOCKET unsigned int +#else #define FNET_SOCKET int +#endif struct fnet_internal_t { struct fnet_t ext; // KEEP AT TOP, allows casting between fnet_internal_t* and fnet_t*