Subject: libevent-dev: event.h does not include <sys/types.h> but depends on it.
Package: libevent-dev
Version: 1.3e-3
Severity: normal
*** Please type your report below this line ***
Consider the following program:
#include <event.h>
int
main (int argc, char *argv[])
{
return 0;
}
Compiling this yields:
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"foobar\"
-DVERSION=\"2.7.0\" -DHAVE_LIBEVENT=1 -I. -I../../src -g -O2 -MT
main.o -MD -MP -MF .deps/main.Tpo -c -o main.o ../../src/main.c
In file included from ../../src/main.c:1:
/usr/include/event.h:214: error: expected specifier-qualifier-list
before ‘u_char’
/usr/include/event.h:237: error: expected specifier-qualifier-list
before ‘size_t’
/usr/include/event.h:267: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘bufferevent_read’
/usr/include/event.h:282: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:283: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:284: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:289: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:292: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
/usr/include/event.h:293: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:293: error: expected declaration specifiers or
‘...’ before ‘size_t’
/usr/include/event.h:328: error: expected declaration specifiers or
‘...’ before ‘size_t’
make[1]: *** [main.o] Error 1
The problem is that event.h uses u_char, which is defined in
<sys/types.h>, however, event.h does not include the appropriate header
file. Including <sys/types.h> fixes the problem.
-- System Information:
Debian Release: 5.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libevent-dev depends on:
ii libevent1 1.3e-3 An asynchronous event notification
libevent-dev recommends no packages.
libevent-dev suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]