Bug#220232: linux/time.h conflicts with time.h

2003-11-11 Thread Goswin von Brederlow
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.0 +
+++ /usr/include/linux/time.h   2003-11-11 18:12:58.0 +
@@ -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.0 +
+++ /usr/include/linux/time.h   2003-11-11 18:23:43.0 +
@@ -353,10 +353,12 @@
 #defineITIMER_VIRTUAL  1
 #defineITIMER_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 */




Bug#220232: linux/time.h conflicts with time.h

2003-11-11 Thread Goswin von Brederlow
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.0 +
+++ /usr/include/linux/time.h   2003-11-11 18:12:58.0 +
@@ -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.0 +
+++ /usr/include/linux/time.h   2003-11-11 18:23:43.0 +
@@ -353,10 +353,12 @@
 #defineITIMER_VIRTUAL  1
 #defineITIMER_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 */


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]