Click to See Complete Forum and Search --> : Compiling hping2


Resident_Geek
01-24-2003, 10:37 PM
I just installed Red Hat 8.0 (with help from LNO), and I am now trying to compile hping2 to check out its features. I searched through the forums for references to compiling, and read the nhf on compiling software. I downloaded both the beta53 and beta54 versions from kyuzz.org/antirez, and both have the same problem. I run the configure script fine, and then try make. make's output is

gcc -c -O2 -Wall -g -DLIMITWHENSUID -DHAVE_PROC getusec.c
getusec.c: In function `get_usec':
getusec.c:17: `NULL' undeclared (first use in this function)
getusec.c:17: (Each undeclared identifier is reported only once
getusec.c:17: for each function it appears in.)
make: *** [getusec.o] Error 1

I looked, and both the archives seem to be devoid of a setusec.o file. Is that supposed to be the case?Am I doing something wrong? Thanks for any help you can give.

bwkaz
01-24-2003, 11:21 PM
That error says getusec.o because that was the file that was being created when make ran into the error. The actual error was above -- "in function `get_usec': `NULL' undeclared". The NULL symbol is declared to be 0 in at minimum, stdlib.h. If you edit the getusec.c file, and add a #include <stdlib.h> line near the top (probably near the other includes would be good), and try the make again, see if that helps.

Resident_Geek
01-25-2003, 10:24 AM
It worked! Thanks:)