diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-03-12 18:59:42 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-03-14 16:21:33 +0100 |
commit | e7f71f16d07e5439ee2151344eef3e7cf113b7b5 (patch) | |
tree | d07b0d5e077f9c09db5168b6156e54c69c2e9733 | |
parent | ebbe76d953e3261c3fa2311ec0ed909fbd6e3359 (diff) |
O_CLOEXEC needs _GNU_SOURCE defined
From man open(2):
The O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags are not specified
in POSIX.1-2001, but are specified in POSIX.1-2008. Since glibc
2.12, one can obtain their definitions by defining either
_POSIX_C_SOURCE with a value greater than or equal to 200809L or
_XOPEN_SOURCE with a value greater than or equal to 700. In glibc
2.11 and earlier, one obtains the definitions by defining
_GNU_SOURCE.
And indeed, with the uClibc C library, O_CLOEXEC is not exposed if
_GNU_SOURCE is not defined. Therefore, this commit fixes the build of
gstreamer-vaapi with the uClibc C library.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
https://bugzilla.gnome.org/show_bug.cgi?id=779953
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidisplay_drm.c | 1 | ||||
-rw-r--r-- | tests/test-display.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_drm.c b/gst-libs/gst/vaapi/gstvaapidisplay_drm.c index 56da2350..3608bc61 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay_drm.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay_drm.c @@ -25,6 +25,7 @@ * @short_description: VA/DRM display abstraction */ +#define _GNU_SOURCE #include "sysdeps.h" #include <string.h> #include <unistd.h> diff --git a/tests/test-display.c b/tests/test-display.c index be9c24be..9abe7546 100644 --- a/tests/test-display.c +++ b/tests/test-display.c @@ -22,6 +22,7 @@ * Boston, MA 02110-1301 USA */ +#define _GNU_SOURCE #include "gst/vaapi/sysdeps.h" #include <gst/video/video.h> #if USE_DRM |