On Thu, 10 Apr 2003 10:51:34 +0200 Henning Meier-Geinitz <henn...@meier-geinitz.de> wrote:
> Hi, > > On Thu, Apr 10, 2003 at 12:46:27AM -0300, John Coppens wrote: > > Get this error on compiling sane-backends 1.0.11: > > Please provide more details. This is which Linux version? Which > version of glibc? Which distribution? Which gcc? > > I haven't seen any bug reports about this ever. The include hasn't > changed since ... well ... since the beginning of the time :-) > > > gcc -c -g -O2 -W -Wall -DHAVE_CONFIG_H -I. -I. -I../include > > -I../include-DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d > > -DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=1 -DV_MINOR=0 > > -DBACKEND_NAME=v4l -DLIBDIR=/usr/local/lib/sane v4l.c -fPIC -DPIC -o > > v4l.lo > > In file included from /usr/include/linux/videodev2.h:16, > > from /usr/include/linux/videodev.h:14, > > from v4l.c:76: > > /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 v4l.c, line 67, I changed: > > > > #include <sys/time.h> > > to > > #include <linux/time.h> > > That doesn't look right. We shouldn't include the low-level headers if > th at's not absolutely necessary. However, I think we don't need > sys/time.h anyway. At least for me it compiles without that include. Hello Henning. First off, the last item: /usr/include/linux _is_ a link to the kernel includes. How do I change that? Where do I get the right include files? About the above includes: I've been looking around in the source files, and found quite a few references to sys/ and linux/ include files. One of the reasons I finally put the message on the list is that I got completely lost in all the duplicate/repeated includes. gcc 3.2.2 kernel is 2.4.20 distro is Slackware 8.1 - with many updates glibc 2.3.1 John