After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709423 - v4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE
v4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.0
Other Linux
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-04 11:42 UTC by Peter Korsgaard
Modified: 2013-10-10 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix issue (1.16 KB, patch)
2013-10-04 11:42 UTC, Peter Korsgaard
needs-work Details | Review
patch with suggested changes (1.19 KB, patch)
2013-10-04 12:23 UTC, Peter Korsgaard
committed Details | Review

Description Peter Korsgaard 2013-10-04 11:42:46 UTC
Created attachment 256463 [details] [review]
patch to fix issue

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.
Comment 1 Sebastian Dröge (slomo) 2013-10-04 12:03:48 UTC
Comment on attachment 256463 [details] [review]
patch to fix issue

You should only #define it if it wasn't defined yet, otherwise it might lead to compiler warnings
Comment 2 Peter Korsgaard 2013-10-04 12:22:28 UTC
(In reply to comment #1)
> (From update of attachment 256463 [details] [review])
> You should only #define it if it wasn't defined yet, otherwise it might lead to
> compiler warnings

We define it before including any headers (except for config.h), so that's fairly unlikely but ok, I'll attach an updated patch
Comment 3 Peter Korsgaard 2013-10-04 12:23:23 UTC
Created attachment 256470 [details] [review]
patch with suggested changes
Comment 4 Sebastian Dröge (slomo) 2013-10-04 12:34:06 UTC
commit 94f3d6fc077947e2dde3e40dce4718ef84deb15c
Author: Peter Korsgaard <peter@korsgaard.com>
Date:   Fri Oct 4 13:34:09 2013 +0200

    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