mirror of https://github.com/mgba-emu/mgba.git
Windows: Buildfixes
This commit is contained in:
parent
c57075a539
commit
536170c331
|
@ -195,9 +195,11 @@ static inline Socket SocketOpenTCP(int port, const struct Address* bindAddress)
|
|||
|
||||
int err;
|
||||
|
||||
int enable = 1;
|
||||
const int enable = 1;
|
||||
#ifdef GEKKO
|
||||
err = net_setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable));
|
||||
#elif defined(_WIN32)
|
||||
err = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*) &enable, sizeof(enable));
|
||||
#else
|
||||
err = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable));
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include <mgba/script/context.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <mgba/internal/script/socket.h>
|
||||
#include <mgba/script/macros.h>
|
||||
#include <mgba-util/socket.h>
|
||||
|
|
Loading…
Reference in New Issue