Index: configure
===================================================================
--- configure	(revision 32493)
+++ configure	(working copy)
@@ -5335,6 +5335,7 @@
 echocheck "IVTV TV-Out (pre linux-2.6.24)"
 if test "$_ivtv" = auto ; then
   cat > $TMPC << EOF
+#include <sys/time.h>
 #include <linux/videodev2.h>
 #include <linux/ivtv.h>
 #include <sys/ioctl.h>
@@ -5363,6 +5364,7 @@
 echocheck "V4L2 MPEG Decoder"
 if test "$_v4l2" = auto ; then
   cat > $TMPC << EOF
+#include <sys/time.h>
 #include <linux/videodev2.h>
 #include <linux/version.h>
 int main(void) {
@@ -7427,7 +7429,7 @@
 if test "$_tv_v4l1" = auto ; then
   _tv_v4l1=no
   if test "$_tv" = yes && linux ; then
-    header_check linux/videodev.h && _tv_v4l1=yes
+    header_check_broken sys/time.h linux/videodev.h && _tv_v4l1=yes
   fi
 fi
 if test "$_tv_v4l1" = yes ; then
@@ -7447,7 +7449,7 @@
 if test "$_tv_v4l2" = auto ; then
   _tv_v4l2=no
   if test "$_tv" = yes && linux ; then
-    header_check linux/videodev2.h && _tv_v4l2=yes
+    header_check_broken sys/time.h linux/videodev2.h && _tv_v4l2=yes
   fi
 fi
 if test "$_tv_v4l2" = yes ; then
@@ -7546,6 +7548,7 @@
  _pvr=no
  if test "$_tv_v4l2" = yes && linux ; then
   cat > $TMPC <<EOF
+#include <sys/time.h>
 #include <linux/videodev2.h>
 int main(void) { struct v4l2_ext_controls ext; return ext.controls->value; }
 EOF

