Friday, March 27, 2009

Unofficial Snort 2.8.3.x patch for GCC 4.3.x build errors

Noted some issues lately in the community with build issues when building snort 2.8.3.x using GCC 4.3.x. Specifically you may receive output as follows:

In function ‘open’,
inlined from ‘server_stats_save’ at server_stats.c:349:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[5]: *** [server_stats.o] Error 1
make[5]: Leaving directory `~/snort-'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `~/snort-'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `~/snort-'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `~/snort-'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/snort-'
make: *** [all] Error 2
If you are receiving the aforementioned error on build, it's likely a simple fix that you can apply to src/preprocessors/flow/portscan/server_stats.c... yes, the patch is below:

if you don't know how to patch the file, I suggest using google to figure it out ;-)

Click me for the patch


No comments: