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

Unified Diff: sandbox/linux/suid/process_util_linux.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 | « sandbox/linux/suid/linux_util.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/suid/process_util_linux.c
diff --git a/sandbox/linux/suid/process_util_linux.c b/sandbox/linux/suid/process_util_linux.c
index d4858c4726184fb9efad035e3307d5874b6b870d..2058c3f62c5e495c58efd6fd72a1ca8016993d1a 100644
--- a/sandbox/linux/suid/process_util_linux.c
+++ b/sandbox/linux/suid/process_util_linux.c
@@ -5,9 +5,12 @@
// The following is the C version of code from base/process_utils_linux.cc.
// We shouldn't link against C++ code in a setuid binary.
-#include "sandbox/linux/suid/process_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 // needed for O_DIRECTORY
+#include "sandbox/linux/suid/process_util.h"
#include <fcntl.h>
#include <inttypes.h>
« no previous file with comments | « sandbox/linux/suid/linux_util.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698