Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: sandbox/linux/suid/linux_util.c

Issue 266913019: Ensure that _GNU_SOURCE is defined early enough (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a better comment Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sandbox/linux/suid/process_util_linux.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/suid/linux_util.c
diff --git a/sandbox/linux/suid/linux_util.c b/sandbox/linux/suid/linux_util.c
index 320f6ca37429fd4fe5ba9429ad547354a16047ed..9febe6d9cf2c62369154f13c2b7614d709540379 100644
--- a/sandbox/linux/suid/linux_util.c
+++ b/sandbox/linux/suid/linux_util.c
@@ -5,9 +5,12 @@
// The following is duplicated from base/linux_utils.cc.
// We shouldn't link against C++ code in a setuid binary.
-#include "sandbox/linux/suid/linux_util.h"
+// Needed for O_DIRECTORY, must be defined before fcntl.h is included
+// (and it can be included earlier than the explicit #include below
+// in some versions of glibc).
+#define _GNU_SOURCE
-#define _GNU_SOURCE // For O_DIRECTORY
+#include "sandbox/linux/suid/linux_util.h"
#include <dirent.h>
#include <errno.h>
« no previous file with comments | « no previous file | sandbox/linux/suid/process_util_linux.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698