GNOME Bugzilla – Bug 709423
v4l2bufferpool: O_CLOEXEC needs _GNU_SOURCE
Last modified: 2013-10-10 10:32:54 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 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
(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
Created attachment 256470 [details] [review] patch with suggested changes
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