board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / gstreamer1 / gst1-vaapi / 0001-O_CLOEXEC-needs-_GNU_SOURCE-defined.patch
blobd69846c76af3918387ecee2d9adde1a1f3d1bb27
1 From 3e392e097fc0e98e606721748e8baee0e079a1a2 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sun, 12 Mar 2017 18:59:42 +0100
4 Subject: [PATCH] O_CLOEXEC needs _GNU_SOURCE defined
6 From man open(2):
8 The O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags are not specified
9 in POSIX.1-2001, but are specified in POSIX.1-2008. Since glibc
10 2.12, one can obtain their definitions by defining either
11 _POSIX_C_SOURCE with a value greater than or equal to 200809L or
12 _XOPEN_SOURCE with a value greater than or equal to 700. In glibc
13 2.11 and earlier, one obtains the definitions by defining
14 _GNU_SOURCE.
16 And indeed, with the uClibc C library, O_CLOEXEC is not exposed if
17 _GNU_SOURCE is not defined. Therefore, this commit fixes the build of
18 gstreamer-vaapi with the uClibc C library.
20 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21 ---
22 gst-libs/gst/vaapi/gstvaapidisplay_drm.c | 1 +
23 tests/test-display.c | 1 +
24 2 files changed, 2 insertions(+)
26 diff --git a/gst-libs/gst/vaapi/gstvaapidisplay_drm.c b/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
27 index f436036..00ff039 100644
28 --- a/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
29 +++ b/gst-libs/gst/vaapi/gstvaapidisplay_drm.c
30 @@ -25,6 +25,7 @@
31 * @short_description: VA/DRM display abstraction
34 +#define _GNU_SOURCE
35 #include "sysdeps.h"
36 #include <string.h>
37 #include <unistd.h>
38 diff --git a/tests/test-display.c b/tests/test-display.c
39 index be9c24b..9abe754 100644
40 --- a/tests/test-display.c
41 +++ b/tests/test-display.c
42 @@ -22,6 +22,7 @@
43 * Boston, MA 02110-1301 USA
46 +#define _GNU_SOURCE
47 #include "gst/vaapi/sysdeps.h"
48 #include <gst/video/video.h>
49 #if USE_DRM
50 --
51 2.7.4