diff options
author | dogtopus <dogtopus@users.noreply.github.com> | 2017-12-22 12:29:34 -0400 |
---|---|---|
committer | dogtopus <dogtopus@users.noreply.github.com> | 2017-12-22 12:29:34 -0400 |
commit | 549bcf6d71f7bb31c8be6e1d8700ab51c55b6987 (patch) | |
tree | 1e417bee08bb2f7a3670a905e5962c4cdb03178a /src | |
parent | 9336e15197694eeb823da785668c5d892c318db4 (diff) |
Fix build on linux, enable build directory support
Specifically:
- Include stddef.h for missing ptrdiff_t
- Define PCAP_OPENFLAG_PROMISCUOUS if not using WinPcap because it seems to be
a WinPcap extension
- Make use of CMAKE_CURRENT_{SOURCE,BINARY}_DIR to enable building under a
directory other than root of the project
Diffstat (limited to 'src')
-rw-r--r-- | src/WifiAP.cpp | 3 | ||||
-rw-r--r-- | src/libui_sdl/Platform.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/WifiAP.cpp b/src/WifiAP.cpp index f8c9f79..963b4d2 100644 --- a/src/WifiAP.cpp +++ b/src/WifiAP.cpp @@ -23,6 +23,9 @@ #include "WifiAP.h" #include "Platform.h" +#ifndef __WIN32__ +#include <stddef.h> +#endif namespace WifiAP { diff --git a/src/libui_sdl/Platform.cpp b/src/libui_sdl/Platform.cpp index 507e0f3..80aa0e9 100644 --- a/src/libui_sdl/Platform.cpp +++ b/src/libui_sdl/Platform.cpp @@ -38,6 +38,7 @@ #define socket_t int #define sockaddr_t struct sockaddr #define closesocket close + #define PCAP_OPENFLAG_PROMISCUOUS 1 #endif #ifndef INVALID_SOCKET |