mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Updated included headers to support compilation on Windows (using Visual C++)
- most of posix related functions and constants in unistd.h can be found in io.h in Visual C++ - introduced src/compat/msvc.h to adjust for compiler differences (and avoid updating code with #ifdef blocks for Windows support) - removed some included headers that are not needed (both on Unix and Windows builds)
This commit is contained in:
@@ -23,6 +23,10 @@
|
||||
#include "src/operators/operator.h"
|
||||
#include "src/utils/system.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include "src/compat/msvc.h"
|
||||
#endif
|
||||
|
||||
namespace modsecurity {
|
||||
namespace operators {
|
||||
|
||||
|
@@ -16,10 +16,15 @@
|
||||
#include "src/operators/rbl.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@@ -17,10 +17,14 @@
|
||||
#define SRC_OPERATORS_RBL_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
Reference in New Issue
Block a user