安装libevent报错
在Linux虚拟机上安装libevent 的时候make 报错:
[admin@localhost libevent-1.3]$ make
make all-recursive
make[1]: Entering directory `/home/admin/Downloads/libevent-1.3'
Making all in .
make[2]: Entering directory `/home/admin/Downloads/libevent-1.3'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -g -O2 -Wall -c -o event.lo event.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -g -O2 -Wall -c event.c -fPIC -DPIC -o .libs/event.o
event.c: In function 'gettime':
event.c:156:2: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
^
event.c:156:20: error: 'CLOCK_REALTIME' undeclared (first use in this function)
if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
^
event.c:156:20: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [event.lo] Error 1
make[2]: Leaving directory `/home/admin/Downloads/libevent-1.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/admin/Downloads/libevent-1.3'
make: *** [all] Error 2
这是什么原因啊求指教????