From 8f67325a7c44a3553c4b17a6e3f8f78f26cdb74f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 3 Dec 2015 16:30:19 +0100 Subject: Build sandbox support etc. unconditionally on Linux Also, use "#if __APPLE__" instead of "#if SANDBOX_ENABLED" to prevent ambiguity. --- src/libstore/local-store.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/libstore/local-store.cc') diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 978bca28d..d7cd0b088 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -23,16 +23,11 @@ #include #include -#if HAVE_UNSHARE && HAVE_STATVFS && HAVE_SYS_MOUNT_H +#if __linux__ #include #include #include -#endif - -#if HAVE_LINUX_FS_H -#include #include -#include #endif #include @@ -502,7 +497,7 @@ void LocalStore::openDB(bool create) bind mount. So make the Nix store writable for this process. */ void LocalStore::makeStoreWritable() { -#if HAVE_UNSHARE && HAVE_STATVFS && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(MS_REMOUNT) +#if __linux__ if (getuid() != 0) return; /* Check if /nix/store is on a read-only mount. */ struct statvfs stat; -- cgit v1.2.3