diff options
Diffstat (limited to 'src/ghdlserver/ghdlserver.h')
-rw-r--r-- | src/ghdlserver/ghdlserver.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/ghdlserver/ghdlserver.h b/src/ghdlserver/ghdlserver.h index 9f23f0b..e04209b 100644 --- a/src/ghdlserver/ghdlserver.h +++ b/src/ghdlserver/ghdlserver.h @@ -1,13 +1,25 @@ /* 18.Mar.2017 - RM - Cleaned up.*/ +/* 20.June.2020 - BM - Added OS dependent includes*/ +#define _GNU_SOURCE +#include <stdio.h> #include <stdlib.h> #include <stdint.h> -#include <stdio.h> #include <unistd.h> #include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> +#include<string.h> + +#ifdef __linux__ + #include <sys/socket.h> + #include <netinet/in.h> + #include <netdb.h> +#elif _WIN32 + #include<ws2tcpip.h> + #include<winsock2.h> + #include<eventsys.h> + #include<windows.h> +#endif + // Should be enough.. #define MAX_BUF_SIZE 4096 |