MinGW Build


random functions DONE

random, srandom, rand_r are not available.

format specifier gives warnings %llu DONE

Replace with %PRIu64

ntohl returns u_long

Gives warnings so needs cast to uint32_t

memmem not available DONE

Probably replace with some of the spm code we already have.

endianess and wordsize checks not working DONE

Need better check.

glob.h / glob support not available DONE

Either need to find another way to do glob or simply don't support this feature. Need a fallback then.

pcap -> wpcap DONE

In cygwin guides we required renaming wpcap.lib to pcap.lib. We can also just handle wpcap in configure.

signals not available DONE

All signals code fails to compile. Need to look at how Windows does it.

In the mintty ctrl-c doesn't work but in regular cmd.exe it does.

mkdir takes no 2nd arg

On linux/bsd mkdir takes a second arg to set permissions. Not on windows. Need a wrapper.

unix socket DONE

Various header files are used w/o checks, fails to build on windows. E.g.sys/un.h

uint type not available: use uint32_t DONE

core dump config code compilation DONE

Header sys/resource.h not available

pidfile / kill

kill() call not available

time handling

struct tm has no tm_gmtoff, tm_zone
strptime() not available

libhtp compiler warning

"warning: ISO C does not support the 'I64' ms_printf length modifier [-Wformat]"

libhtp defaults to -pedantic. It needs to be followed by -Wno-format to suppress this message.

color output

When suricata is started in a regular command prompt, the color codes are printed. Need to figure out how to detect this.

tips 'n tricks

To start the compiled build outside of the env use path:

cd c:\msys64\home\victor\dev\suricata
set PATH=C:\msys64\mingw64\bin;%PATH%
src\suricata.exe -c suricata.yaml -l . -i