Skip to content

Commit 490b90d

Browse files
committed
Merge branch 'master' of github.com:eudev-project/eudev
2 parents ee12a0a + 39979dd commit 490b90d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/v4l_id/v4l_id.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <sys/types.h>
2929
#include <sys/time.h>
3030
#include <sys/ioctl.h>
31+
#include <linux/version.h>
3132
#include <linux/videodev2.h>
3233

3334
#include "util.h"
@@ -71,9 +72,11 @@ int main(int argc, char *argv[]) {
7172
printf("ID_V4L_VERSION=2\n");
7273
printf("ID_V4L_PRODUCT=%s\n", v2cap.card);
7374
printf("ID_V4L_CAPABILITIES=:");
75+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
7476
if (v2cap.capabilities & V4L2_CAP_DEVICE_CAPS)
7577
capabilities = v2cap.device_caps;
7678
else
79+
#endif
7780
capabilities = v2cap.capabilities;
7881
if ((capabilities & V4L2_CAP_VIDEO_CAPTURE) > 0 ||
7982
(capabilities & V4L2_CAP_VIDEO_CAPTURE_MPLANE) > 0)

0 commit comments

Comments
 (0)