O_CLOEXEC needs _GNU_SOURCE defined
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Mar 2017 17:59:42 +0000 (18:59 +0100)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 14 Mar 2017 15:12:27 +0000 (16:12 +0100)
commit159e3c3f08ef1c19da4ede8a437337dd8cf7f0b7
treeaf9ac47f20217866571779b01d8d62732ca08346
parent7b64cec70fd2e3ffc74d2236f5ac5e8235f13f9a
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
gst-libs/gst/vaapi/gstvaapidisplay_drm.c
tests/test-display.c