#ifndef _DVBDMX_H_
#define _DVBDMX_H_
+#include <stdint.h>
#include <sys/types.h>
#include <time.h>
#ifndef _DVBFRONTEND_H_
#define _DVBFRONTEND_H_
+#include <stdint.h>
#include <sys/types.h>
typedef enum fe_type {
#ifndef _DVBNET_H_
#define _DVBNET_H_
+#include <stdint.h>
#include <sys/types.h>
struct dvb_net_if {
#include <linux/time.h>
#include <linux/list.h>
#else
+#include <stdint.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#endif
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define __user
#define _IOC_READ IOC_OUT
#define _IOC_WRITE IOC_IN
#ifndef __LINUX_IVTV_H__
#define __LINUX_IVTV_H__
+#include <stdint.h>
#include <sys/types.h>
#include <linux/videodev2.h>
#ifndef __LINUX_VIDEODEV2_H
#define __LINUX_VIDEODEV2_H
+#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-Index: freebsd/include/linux/dvb/audio.h
-===================================================================
---- freebsd.orig/include/linux/dvb/audio.h
-+++ freebsd/include/linux/dvb/audio.h
+--- a/include/linux/dvb/audio.h
++++ b/include/linux/dvb/audio.h
@@ -24,7 +24,7 @@
#ifndef _DVBAUDIO_H_
#define _DVBAUDIO_H_
-Index: freebsd/include/linux/dvb/dmx.h
-===================================================================
---- freebsd.orig/include/linux/dvb/dmx.h
-+++ freebsd/include/linux/dvb/dmx.h
-@@ -24,13 +24,8 @@
+--- a/include/linux/dvb/dmx.h
++++ b/include/linux/dvb/dmx.h
+@@ -24,13 +24,9 @@
#ifndef _DVBDMX_H_
#define _DVBDMX_H_
-#ifdef __KERNEL__
-#include <linux/time.h>
-#else
++#include <stdint.h>
+#include <sys/types.h>
#include <time.h>
-#endif
-Index: freebsd/include/linux/dvb/frontend.h
-===================================================================
---- freebsd.orig/include/linux/dvb/frontend.h
-+++ freebsd/include/linux/dvb/frontend.h
-@@ -26,7 +26,7 @@
+--- a/include/linux/dvb/frontend.h
++++ b/include/linux/dvb/frontend.h
+@@ -26,7 +26,8 @@
#ifndef _DVBFRONTEND_H_
#define _DVBFRONTEND_H_
-#include <linux/types.h>
++#include <stdint.h>
+#include <sys/types.h>
typedef enum fe_type {
-Index: freebsd/include/linux/dvb/net.h
-===================================================================
---- freebsd.orig/include/linux/dvb/net.h
-+++ freebsd/include/linux/dvb/net.h
-@@ -24,7 +24,7 @@
+--- a/include/linux/dvb/net.h
++++ b/include/linux/dvb/net.h
+@@ -24,7 +24,8 @@
#ifndef _DVBNET_H_
#define _DVBNET_H_
-#include <linux/types.h>
++#include <stdint.h>
+#include <sys/types.h>
struct dvb_net_if {
-Index: freebsd/include/linux/dvb/osd.h
-===================================================================
---- freebsd.orig/include/linux/dvb/osd.h
-+++ freebsd/include/linux/dvb/osd.h
+--- a/include/linux/dvb/osd.h
++++ b/include/linux/dvb/osd.h
@@ -24,7 +24,7 @@
#ifndef _DVBOSD_H_
#define _DVBOSD_H_
-Index: freebsd/include/linux/dvb/video.h
-===================================================================
---- freebsd.orig/include/linux/dvb/video.h
-+++ freebsd/include/linux/dvb/video.h
+--- a/include/linux/dvb/video.h
++++ b/include/linux/dvb/video.h
@@ -24,13 +24,9 @@
#ifndef _DVBVIDEO_H_
#define _DVBVIDEO_H_
-Index: freebsd/include/linux/dvb/video.h
-===================================================================
---- freebsd.orig/include/linux/dvb/video.h
-+++ freebsd/include/linux/dvb/video.h
-@@ -133,7 +133,7 @@ struct video_event {
+--- a/include/linux/dvb/video.h
++++ b/include/linux/dvb/video.h
+@@ -133,7 +133,7 @@
#define VIDEO_EVENT_FRAME_RATE_CHANGED 2
#define VIDEO_EVENT_DECODER_STOPPED 3
#define VIDEO_EVENT_VSYNC 4
-Index: freebsd/include/linux/input.h
-===================================================================
---- freebsd.orig/include/linux/input.h
-+++ freebsd/include/linux/input.h
-@@ -16,8 +16,44 @@
+--- a/include/linux/input.h
++++ b/include/linux/input.h
+@@ -13,11 +13,48 @@
+ #include <linux/time.h>
+ #include <linux/list.h>
+ #else
++#include <stdint.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/types.h>
+#endif
+#endif
+
-+#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#define __user
+#define _IOC_READ IOC_OUT
+#define _IOC_WRITE IOC_IN
-Index: freebsd/include/linux/ivtv.h
-===================================================================
---- freebsd.orig/include/linux/ivtv.h
-+++ freebsd/include/linux/ivtv.h
-@@ -21,8 +21,7 @@
+--- a/include/linux/ivtv.h
++++ b/include/linux/ivtv.h
+@@ -21,8 +21,8 @@
#ifndef __LINUX_IVTV_H__
#define __LINUX_IVTV_H__
-#include <linux/compiler.h>
-#include <linux/types.h>
++#include <stdint.h>
+#include <sys/types.h>
#include <linux/videodev2.h>
-Index: freebsd/include/linux/videodev2.h
-===================================================================
---- freebsd.orig/include/linux/videodev2.h
-+++ freebsd/include/linux/videodev2.h
-@@ -56,14 +56,38 @@
+--- a/include/linux/videodev2.h
++++ b/include/linux/videodev2.h
+@@ -56,14 +56,39 @@
#ifndef __LINUX_VIDEODEV2_H
#define __LINUX_VIDEODEV2_H
-#ifdef __KERNEL__
-#include <linux/time.h> /* need struct timeval */
-#else
++#include <stdint.h>
#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>