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

Unified Diff: native_client_sdk/src/libraries/nacl_mounts/kernel_wrap_newlib.cc

Issue 11744010: [NaCl SDK] Change the kernel_wrap OS #ifdefs in nacl_mounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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
Index: native_client_sdk/src/libraries/nacl_mounts/kernel_wrap_newlib.cc
diff --git a/native_client_sdk/src/libraries/nacl_mounts/kernel_wrap_newlib.cc b/native_client_sdk/src/libraries/nacl_mounts/kernel_wrap_newlib.cc
index d4cb61869c267824f35eda965a727105f94ffc8f..57cbdb34feb0463ce90558c815c80533113a1ae2 100644
--- a/native_client_sdk/src/libraries/nacl_mounts/kernel_wrap_newlib.cc
+++ b/native_client_sdk/src/libraries/nacl_mounts/kernel_wrap_newlib.cc
@@ -3,6 +3,12 @@
* found in the LICENSE file.
*/
+#include <sys/types.h> // Include something that will define __GLIBC__.
+
+// The entire file is wrapped in this #if. We do this so this .cc file can be
+// compiled, even on a non-newlib build.
+#if defined(__native_client__) && !defined(__GLIBC__)
+
#include "nacl_mounts/kernel_wrap.h"
#include <dirent.h>
#include <errno.h>
@@ -161,3 +167,5 @@ static struct NaClMountsStaticInitializer {
DO_WRAP(filename, stat);
}
} nacl_mounts_static_initializer;
+
+#endif // defined(__native_client__) && !defined(__GLIBC__)

Powered by Google App Engine
This is Rietveld 408576698