aLEczapKA Apprentice
Joined: 13 Jun 2003 Posts: 192
|
Posted: Fri Aug 15, 2003 2:05 am Post subject: (SOLVED)error: redefinition of 'struct timespec' |
|
|
I have some errors trying to compile direcffb, also compiling xine gives me such error.
However compiling mozilla, gcc, etc. didn't cause me any troubles.
I am sure my linux headers are ok, if this would be the issue... any ideas?
Code: |
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../src -DDATADIR=\"/usr/share/directfb-0.9.18\" -D_REENTRANT -Wall -O3 -pipe -march=athlon-xp -O3 -pipe -fomit-frame-pointer -DFUSION_FAKE -Werror-implicit-function-declarations -c idirectfbvideoprovider_v4l.c
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../src -DDATADIR=\"/usr/share/directfb-0.9.18\" -D_REENTRA NT -Wall -O3 -pipe -march=athlon-xp -O3 -pipe -fomit-frame-pointer -DFUSION_FAKE -Werror-implicit-function-declarat ions -c idirectfbvideoprovider_v4l.c -fPIC -DPIC -o idirectfbvideoprovider_v4l.lo
In file included from /usr/include/linux/videodev2.h:16,
from /usr/include/linux/videodev.h:14,
from idirectfbvideoprovider_v4l.c:43:
/usr/include/linux/time.h:9: redefinition of `struct timespec'
/usr/include/linux/time.h:88: redefinition of `struct timeval'
/usr/include/linux/time.h:93: redefinition of `struct timezone'
/usr/include/linux/time.h:124: redefinition of `struct itimerval'
In file included from /usr/include/pthread.h:21,
from ../../src/core/fusion/lock.h:72,
from ../../src/core/core.h:31,
from idirectfbvideoprovider_v4l.c:52:
/usr/include/time.h:160: redefinition of `struct itimerspec'
make[3]: *** [idirectfbvideoprovider_v4l.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/DirectFB-0.9.18/work/DirectFB-0.9.18/interfaces/IDirectFBVideoProvider '
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/DirectFB-0.9.18/work/DirectFB-0.9.18/interfaces'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/DirectFB-0.9.18/work/DirectFB-0.9.18'
make: *** [all-recursive-am] Error 2
!!! ERROR: dev-libs/DirectFB-0.9.18 failed.
!!! Function src_compile, Li
|
UPDATE
Found the error, it's in /usr/include/linux/videodev2.h, around line 16.
Code: |
#include <linux/time.h> /* need struct timeval */
|
Just comment out this line - looks like time.h is beeing included somewhere else already.
I've tried kernels 2.4, 2.5, 2.6 and it's all the same. _________________ while true; do eject /dev/cdrom; eject -t /dev/cdrom; done |
|