1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-11-21 12:40:04 +00:00

Lib: fix windows headers

This commit is contained in:
CPunch 2022-06-27 19:11:43 -05:00
parent b6eebdd5fb
commit 692b3c6137

View File

@ -1,6 +1,11 @@
#ifndef LAIKA_SOCKET_H #ifndef LAIKA_SOCKET_H
#define LAIKA_SOCKET_H #define LAIKA_SOCKET_H
/* clang-format will change the order of the included windows headers, this BREAKS THINGS. for now, make clang ignore this section */
/* clang-format off */
/* socket/winsock headers */ /* socket/winsock headers */
#ifdef _WIN32 #ifdef _WIN32
/* windows */ /* windows */
@ -8,8 +13,8 @@
# define NOMINMAX # define NOMINMAX
# endif # endif
# define _WINSOCK_DEPRECATED_NO_WARNINGS # define _WINSOCK_DEPRECATED_NO_WARNINGS
# include <windows.h>
# include <winsock2.h> # include <winsock2.h>
# include <windows.h>
# include <ws2tcpip.h> # include <ws2tcpip.h>
# pragma comment(lib, "Ws2_32.lib") # pragma comment(lib, "Ws2_32.lib")
@ -54,6 +59,8 @@ typedef void buffer_t;
#include <fcntl.h> #include <fcntl.h>
#include <stdbool.h> #include <stdbool.h>
/* clang-format on */
typedef enum typedef enum
{ {
RAWSOCK_OK, RAWSOCK_OK,