diff --git a/src/gui/src/unix/DefaultInterfaceIP.cpp b/src/gui/src/unix/DefaultInterfaceIP.cpp index b276b202..d5c89cec 100644 --- a/src/gui/src/unix/DefaultInterfaceIP.cpp +++ b/src/gui/src/unix/DefaultInterfaceIP.cpp @@ -1,18 +1,23 @@ -#include -#include -#include -#include -#include -#include -#include +#include #include "SocketResource.h" #include "IfAddrsResource.h" +#include +#include +#include + +#ifdef __linux__ +#include +#endif + +#include +#include namespace Debauchee { static bool is_wireless(const char * ifname) { +#ifdef __linux__ if (ifname) { SocketResource fd(AF_INET, SOCK_STREAM, 0); if (fd.is_valid()) { @@ -21,6 +26,7 @@ static bool is_wireless(const char * ifname) return ioctl(fd, SIOCGIWMODE, req) >= 0; } } +#endif return false; } diff --git a/src/gui/src/unix/SocketResource.h b/src/gui/src/unix/SocketResource.h index bff23e44..57eb1727 100644 --- a/src/gui/src/unix/SocketResource.h +++ b/src/gui/src/unix/SocketResource.h @@ -1,5 +1,6 @@ #include #include +#include namespace Debauchee {