From c1cbdf6ae9bd8d362f00f046874206503dd1c21a Mon Sep 17 00:00:00 2001 From: Jan Jezek Date: Thu, 18 Feb 2010 14:19:34 +0100 Subject: [PATCH] Win32 build fixed. --- INSTALL | 31 ++++++------------------------- src/threads.h | 4 +++- src/win32-misc.h | 2 ++ 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/INSTALL b/INSTALL index 3bce41d048..0c3725a7f7 100644 --- a/INSTALL +++ b/INSTALL @@ -42,13 +42,7 @@ the following packages to c:\mingw (use newer versions if you like): MinGW Installed? : [y] path to MinGW: [c:/MinGW] -3. Get SVN (required for libhtp) - - http://subversion.tigris.org/files/documents/15/45940/svn-win32-1.6.2.zip - - Unpack the zip to c:/msys/1.0/local - -4. Get git +3. Get git Download portable GIT from this URL: http://code.google.com/p/msysgit/ @@ -56,7 +50,7 @@ the following packages to c:\mingw (use newer versions if you like): - unpack to /msys/1.0 - don't forget to edit your ~/.gitconfig to at least give youreself a name :-) -5. Get libpcre +4. Get libpcre http://www.pcre.org/ @@ -64,7 +58,7 @@ the following packages to c:\mingw (use newer versions if you like): make make install -6. Get libyaml +5. Get libyaml http://pyyaml.org/wiki/LibYAML @@ -74,7 +68,7 @@ the following packages to c:\mingw (use newer versions if you like): make make install -7. Get libpcap +6. Get libpcap Guide can be found here: http://mathieu.carbou.free.fr/wiki/index.php?title=Winpcap_/_Libpcap#Installing_Winpcap_in_MinGW @@ -85,7 +79,7 @@ the following packages to c:\mingw (use newer versions if you like): - Copy includes to c:/mingw/include and libs (.a) to c:/mingw/lib - Rename libwpcap to libpcap -8. Get zlib +7. Get zlib http://sourceforge.net/projects/mingw/files/ @@ -93,20 +87,7 @@ the following packages to c:\mingw (use newer versions if you like): make make install -9. Get libhtp - - svn co https://libhtp.svn.sourceforge.net/svnroot/libhtp libhtp - cd libhtp/trunk - aclocal - libtoolize --force --automake --copy - autoheader - automake --add-missing --copy - autoconf - ./confgure --prefix=/mingw - make - make install - -10. Get and compile Suricata +8. Get and compile Suricata git clone git://phalanx.openinfosecfoundation.org/oisf.git cd oisf diff --git a/src/threads.h b/src/threads.h index 281b67b4ba..bdd2d184ba 100644 --- a/src/threads.h +++ b/src/threads.h @@ -24,7 +24,9 @@ #elif OS_WIN32 -/* nothing (yet?) */ +#define PRIO_LOW THREAD_PRIORITY_LOWEST +#define PRIO_MEDIUM THREAD_PRIORITY_NORMAL +#define PRIO_HIGH THREAD_PRIORITY_HIGHEST #else /* LINUX */ diff --git a/src/win32-misc.h b/src/win32-misc.h index d235cc884a..1596e697a4 100644 --- a/src/win32-misc.h +++ b/src/win32-misc.h @@ -4,6 +4,8 @@ #define index strchr #define rindex strrchr +#define strtok_r(s,d,p) strtok(s,d) + const char* inet_ntop(int af, const void *src, char *dst, uint32_t cnt); int inet_pton(int af, const char *src, void *dst);