diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-12-03 16:30:19 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-12-10 11:47:17 +0100 |
commit | 8f67325a7c44a3553c4b17a6e3f8f78f26cdb74f (patch) | |
tree | b93635887cc64243655183c84a013ef783f1baa1 /src/libstore/local-store.cc | |
parent | 7431932b29d7a0be3a1fdb10f7d5dc1ea6dbd366 (diff) |
Build sandbox support etc. unconditionally on Linux
Also, use "#if __APPLE__" instead of "#if SANDBOX_ENABLED" to prevent
ambiguity.
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 9 |
1 files changed, 2 insertions, 7 deletions
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 <time.h> #include <grp.h> -#if HAVE_UNSHARE && HAVE_STATVFS && HAVE_SYS_MOUNT_H +#if __linux__ #include <sched.h> #include <sys/statvfs.h> #include <sys/mount.h> -#endif - -#if HAVE_LINUX_FS_H -#include <linux/fs.h> #include <sys/ioctl.h> -#include <errno.h> #endif #include <sqlite3.h> @@ -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; |