1 From 4f305f30c9917f7a6ea7332a798401f2a5abe981 Mon Sep 17 00:00:00 2001
2 From: Peter Korsgaard <peter@korsgaard.com>
3 Date: Fri, 4 Oct 2013 13:34:09 +0200
4 Subject: [PATCH] gstv4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE
6 [Submitted upstream: https://bugzilla.gnome.org/show_bug.cgi?id=709423]
8 On some systems (E.G. uClibc and older Glibc versions), O_CLOEXEC is only
9 defined when _GNU_SOURCE is specified, so do so.
11 _GNU_SOURCE needs to be defined before any system headers are included,
12 so move the fcntl.h section up.
14 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
16 sys/v4l2/gstv4l2bufferpool.c | 10 +++++++---
17 1 file changed, 7 insertions(+), 3 deletions(-)
19 diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
20 index 00c6086..f5396d9 100644
21 --- a/sys/v4l2/gstv4l2bufferpool.c
22 +++ b/sys/v4l2/gstv4l2bufferpool.c
27 -#include <sys/mman.h>
30 #if HAVE_DECL_V4L2_MEMORY_DMABUF
32 +# define _GNU_SOURCE /* O_CLOEXEC */
37 +#include <sys/mman.h>
41 #include "gst/video/video.h"
42 #include "gst/video/gstvideometa.h"
43 #include "gst/video/gstvideopool.h"