Windows compile fixes

This commit is contained in:
JCash 2020-09-03 17:28:10 +02:00
parent 90a654e639
commit bd9e777b99
3 changed files with 18 additions and 2 deletions

View File

@ -2,8 +2,12 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#if defined(_WIN32)
#define HAVE_WINSOCK2_H
#else
#define HAVE_ARPA_INET_H #define HAVE_ARPA_INET_H
#define HAVE_NETINET_IN_H #define HAVE_NETINET_IN_H
#endif
/* #undef HAVE_WINSOCK2_H */ /* #undef HAVE_WINSOCK2_H */
/* #undef WORDS_BIGENDIAN */ /* #undef WORDS_BIGENDIAN */

View File

@ -33,6 +33,14 @@ extern "C" {
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
// Defold addition
#if defined(_WIN32)
#if defined(_WIN64)
typedef int64_t ssize_t;
#else
typedef int32_t ssize_t;
#endif
#endif
/* /*
* wslay/wslayver.h is generated from wslay/wslayver.h.in by * wslay/wslayver.h is generated from wslay/wslayver.h.in by

View File

@ -1,5 +1,9 @@
#pragma once #pragma once
#if defined(_WIN32)
#include <WinSock2.h>
#endif
// include the Defold SDK // include the Defold SDK
#include <dmsdk/sdk.h> #include <dmsdk/sdk.h>