diff --git a/CMakeLists.txt b/CMakeLists.txt index bc698f80..64403da0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ else(${WITH_V4L}) set(WITHOUT_V4L ON) endif(${WITH_V4L}) set(MOTION_V4L2 ${HAVE_LINUX_VIDEODEV2_H}) -set(MOTION_V4L2_OLD ${HAVE_LINUX_VIDEODEV2_H}) configure_file(config.h.in "${CMAKE_CURRENT_SOURCE_DIR}/config.h") configure_file(motion-dist.conf.in motion-dist.conf) diff --git a/config.h.in b/config.h.in index d791908b..de14c1c1 100644 --- a/config.h.in +++ b/config.h.in @@ -18,5 +18,4 @@ #undef PWCBSD #undef OLD_BKTR #cmakedefine MOTION_V4L2 -#cmakedefine MOTION_V4L2_OLD #cmakedefine WITHOUT_V4L diff --git a/configure.ac b/configure.ac index 1e03d8c4..803f97a6 100644 --- a/configure.ac +++ b/configure.ac @@ -745,7 +745,6 @@ AC_CHECK_HEADERS(stdio.h unistd.h stdint.h fcntl.h time.h signal.h sys/ioctl.h s # Check if v4l2 is available SUPPORTED_V4L2=false -SUPPORTED_V4L2_old=false if test "${V4L}" = "no"; then AC_MSG_CHECKING(for V42L support) @@ -755,7 +754,9 @@ else [SUPPORTED_V4L2=true], [SUPPORTED_V4L2=false], [#include - #ifdef HAVE_LINUX_VIDEODEV_H + #ifdef HAVE_LINUX_VIDEODEV2_H + #include + #elif HAVE_LINUX_VIDEODEV_H #include #elif HAVE_SYS_VIDEOIO_H #include @@ -767,20 +768,6 @@ else else AC_MSG_RESULT(no) fi - - # linux/videodev.h doesn't include videodev2.h - if test x$SUPPORTED_V4L2 = xfalse; then - AC_MSG_CHECKING(for V42L *old* support) - AC_MSG_RESULT(testing) - AC_CHECK_HEADERS(linux/videodev2.h,[SUPPORTED_V4L2_old=true],[], [#include ]) - fi - - - if test x$SUPPORTED_V4L2_old = xtrue; then - TEMP_CFLAGS="${TEMP_CFLAGS} -DMOTION_V4L2 -DMOTION_V4L2_OLD" - SUPPORTED_V4L2=true - fi - fi diff --git a/video.h b/video.h index 03bcf659..a39cd2c5 100644 --- a/video.h +++ b/video.h @@ -10,12 +10,12 @@ #ifndef _INCLUDE_VIDEO_H #define _INCLUDE_VIDEO_H -#define _LINUX_TIME_H 1 #include - #if !defined(WITHOUT_V4L) -#if defined(HAVE_LINUX_VIDEODEV_H) +#if defined(HAVE_LINUX_VIDEODEV2_H) +#include +#elif defined(HAVE_LINUX_VIDEODEV_H) #include #elif defined(HAVE_SYS_VIDEOIO_H) #include diff --git a/video2.c b/video2.c index 037dac8a..e828f563 100644 --- a/video2.c +++ b/video2.c @@ -73,12 +73,6 @@ #if !defined(WITHOUT_V4L) && defined(MOTION_V4L2) -#ifdef MOTION_V4L2_OLD -// Seems that is needed for some system -#include -#include -#endif - #define u8 unsigned char #define u16 unsigned short #define u32 unsigned int