47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
|
From 4f305f30c9917f7a6ea7332a798401f2a5abe981 Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Korsgaard <peter@korsgaard.com>
|
||
|
Date: Fri, 4 Oct 2013 13:34:09 +0200
|
||
|
Subject: [PATCH] gstv4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE
|
||
|
|
||
|
[Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=709423]
|
||
|
|
||
|
On some systems (E.G. uClibc and older Glibc versions), O_CLOEXEC is only
|
||
|
defined when _GNU_SOURCE is specified, so do so.
|
||
|
|
||
|
_GNU_SOURCE needs to be defined before any system headers are included,
|
||
|
so move the fcntl.h section up.
|
||
|
|
||
|
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||
|
---
|
||
|
sys/v4l2/gstv4l2bufferpool.c | 10 +++++++---
|
||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
|
||
|
index 00c6086..f5396d9 100644
|
||
|
--- a/sys/v4l2/gstv4l2bufferpool.c
|
||
|
+++ b/sys/v4l2/gstv4l2bufferpool.c
|
||
|
@@ -26,13 +26,17 @@
|
||
|
# include <config.h>
|
||
|
#endif
|
||
|
|
||
|
-#include <sys/mman.h>
|
||
|
-#include <string.h>
|
||
|
-#include <unistd.h>
|
||
|
#if HAVE_DECL_V4L2_MEMORY_DMABUF
|
||
|
+#ifndef _GNU_SOURCE
|
||
|
+# define _GNU_SOURCE /* O_CLOEXEC */
|
||
|
+#endif
|
||
|
#include <fcntl.h>
|
||
|
#endif
|
||
|
|
||
|
+#include <sys/mman.h>
|
||
|
+#include <string.h>
|
||
|
+#include <unistd.h>
|
||
|
+
|
||
|
#include "gst/video/video.h"
|
||
|
#include "gst/video/gstvideometa.h"
|
||
|
#include "gst/video/gstvideopool.h"
|
||
|
--
|
||
|
1.7.10.4
|
||
|
|