Trouble compiling ipaudit

The latest version of ipaudit I can find is 0.95. I needed to get the functionality transferred to a new machine that is running CentOS 6 x64 (not required for my needs, but it’s the latest & greatest). A make produced the following:

[root@hostname ipaudit-0.95]# make
make -C src all
make[1]: Entering directory `/usr/local/src/ipaudit-0.95/src’
cc -c ipaudit.c -I/usr/include/pcap
cc -c hash.c
hash.c: In function ‘addnode’:
hash.c:214: warning: incompatible implicit declaration of built-in function ‘memcpy’
hash.c:233: warning: incompatible implicit declaration of built-in function ‘memcpy’
cc -o ipaudit ipaudit.o hash.o -lpcap
/usr/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in ipaudit.o
/lib64/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [ipaudit] Error 1
make[1]: Leaving directory `/usr/local/src/ipaudit-0.95/src’
make: *** [all] Error 2

I found a note on this page that helped:
http://www.linuxquestions.org/questions/linux-general-1/ld-errno-tbss-mismatches-non-tls-reference-588894/

In the end, I added

#include “errno.h”

to the ‘include’ sections of the following files:
src/ipstrings.c
src/ipaudit.c

Make ran fine!

1 comment to Trouble compiling ipaudit