Commit 402331fd authored by Dominik Charousset's avatar Dominik Charousset

Fix include order on MSVC

parent f4c5842b
......@@ -175,9 +175,11 @@ std::vector<iface_info> get_mac_addresses() {
// windows
# include <iphlpapi.h>
# include <winsock2.h>
// clang-format off
# include <ws2tcpip.h>
# include <winsock2.h>
# include <iphlpapi.h>
// clang-format on
# include <algorithm>
# include <cctype>
......
......@@ -25,14 +25,15 @@
#include <cstdlib>
#include <cstring>
// clang-format off
#ifdef CAF_WINDOWS
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0600
# endif
# include <iostream>
# include <iphlpapi.h>
# include <winsock2.h>
# include <ws2tcpip.h>
# include <iphlpapi.h>
#else
# include <arpa/inet.h>
# include <ifaddrs.h>
......@@ -43,6 +44,7 @@
# include <sys/socket.h>
# include <unistd.h>
#endif
// clang-format on
#include <memory>
#include <utility>
......
......@@ -23,11 +23,12 @@
#include "caf/logger.hpp"
#include "caf/sec.hpp"
// clang-format off
#ifdef CAF_WINDOWS
# include <windows.h>
# include <winsock2.h>
# include <ws2ipdef.h>
# include <windows.h>
# include <ws2tcpip.h>
# include <ws2ipdef.h>
#else
# include <arpa/inet.h>
# include <cerrno>
......@@ -36,6 +37,7 @@
# include <sys/socket.h>
# include <unistd.h>
#endif
// clang-format on
#ifdef CAF_WINDOWS
using sa_family_t = short;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment