Hi, here is a patch that makes linux/time.h work alongside with time.h for userspace inclusion.
I include <time.h> for userspace and don't redefine some structures. A problem might be that some of the elements of the structures have different names in time.h I think. The case I had (openh323) only needed a struct timeval for linux/videodev2.h and time.h and linux/time.h have the same (sized) struct. MfG Goswin ---------------------------------------------------------------------- --- /usr/include/linux/time.h~ 2003-10-15 15:13:08.000000000 +0000 +++ /usr/include/linux/time.h 2003-11-11 18:12:58.000000000 +0000 @@ -4,6 +4,10 @@ #include <asm/param.h> #include <linux/types.h> +#ifndef __KERNEL +#include <time.h> +#else + #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC struct timespec { @@ -22,8 +26,6 @@ int tz_dsttime; /* type of dst correction */ }; -#ifdef __KERNEL__ - #include <linux/spinlock.h> #include <linux/seqlock.h> #include <linux/timex.h> --- /usr/include/linux/time.h~ 2003-11-11 18:12:58.000000000 +0000 +++ /usr/include/linux/time.h 2003-11-11 18:23:43.000000000 +0000 @@ -353,10 +353,12 @@ #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 +#ifdef __KERNEL__ struct itimerspec { struct timespec it_interval; /* timer period */ struct timespec it_value; /* timer expiration */ }; +#endif struct itimerval { struct timeval it_interval; /* timer interval */