v4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE

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.

https://bugzilla.gnome.org/show_bug.cgi?id=709423
This commit is contained in:
Peter Korsgaard 2013-10-04 13:34:09 +02:00 committed by Sebastian Dröge
parent d4892859d4
commit 94f3d6fc07

View file

@ -26,12 +26,16 @@
# include <config.h>
#endif
#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>
#if HAVE_DECL_V4L2_MEMORY_DMABUF
#include <fcntl.h>
#endif
#include "gst/video/video.h"
#include "gst/video/gstvideometa.h"