fnet.c

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

commit 071024513e40f76567a3027df26b9907363d0561
parent 2b584a14d2bcb70c68c1e6975360dc5e2e380574
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Sun, 22 Oct 2023 20:20:55 +0200

Separating windows and linux includes

Diffstat:
Msrc/fnet.c | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/fnet.c b/src/fnet.c @@ -6,16 +6,22 @@ extern "C" { #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> #include <sys/time.h> #include <fcntl.h> #include <sys/types.h> -#include <sys/socket.h> -#include <netdb.h> #include <netinet/tcp.h> #include <sys/epoll.h> +#ifdef _WIN32 +#include <winsock2.h> +#include <Ws2tcpip.h> +#else +#include <netdb.h> +#include <sys/socket.h> +#include <unistd.h> +#endif + #include "tidwall/buf.h" #include "fnet.h"