You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/08/07 03:57:21 UTC

svn commit: r1370099 - /incubator/mesos/trunk/src/linux/cgroups.cpp

Author: benh
Date: Tue Aug  7 01:57:21 2012
New Revision: 1370099

URL: http://svn.apache.org/viewvc?rev=1370099&view=rev
Log:
Added an include for linux/fcntl.h to get O_CLOEXEC on Linux with an
old glibc.

Modified:
    incubator/mesos/trunk/src/linux/cgroups.cpp

Modified: incubator/mesos/trunk/src/linux/cgroups.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/linux/cgroups.cpp?rev=1370099&r1=1370098&r2=1370099&view=diff
==============================================================================
--- incubator/mesos/trunk/src/linux/cgroups.cpp (original)
+++ incubator/mesos/trunk/src/linux/cgroups.cpp Tue Aug  7 01:57:21 2012
@@ -17,7 +17,6 @@
  */
 
 #include <errno.h>
-#include <fcntl.h>
 #include <fts.h>
 #include <signal.h>
 #include <unistd.h>
@@ -25,6 +24,11 @@
 #include <sys/syscall.h>
 #include <sys/types.h>
 
+// For older versions of glibc we need to get O_CLOEXEC from
+// linux/fcntl.h, but on some versions that requires sys/types.h to be
+// included _first_.
+#include <linux/fcntl.h>
+
 #include <glog/logging.h>
 
 #include <fstream>