summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-11-13 11:44:34 +0100
committerLudovic Courtès <ludo@gnu.org>2019-11-13 23:26:35 +0100
commit298fb2907e3f432cea7dee9f58e89ab8d9dbd56f (patch)
treead9ea51a3e52900821f83eed8a496d74e058f590 /nix
parent887fd835a7c90f720d36a211478012547feaead0 (diff)
downloadpatches-298fb2907e3f432cea7dee9f58e89ab8d9dbd56f.tar
patches-298fb2907e3f432cea7dee9f58e89ab8d9dbd56f.tar.gz
daemon: Don't include <linux/fs.h>.
As of GNU libc 2.29, <sys/mount.h> declares all the constants and functions we need, so there's no use in including <linux/fs.h> anymore. This silences annoying warnings like this one: In file included from nix/libstore/local-store.cc:32:0: /gnu/store/…-linux-libre-headers-4.19.56/include/linux/fs.h:108:0: warning: "MS_RDONLY" redefined #define MS_RDONLY 1 /* Mount read-only */ In file included from nix/libstore/local-store.cc:28:0: /gnu/store/…-glibc-2.29/include/sys/mount.h:36:0: note: this is the location of the previous definition #define MS_RDONLY MS_RDONLY * config-daemon.ac: Remove check for <linux/fs.h>. * nix/libstore/build.cc: Remove conditional inclusion of <linux/fs.h>. * nix/libstore/local-store.cc: Remove "#if HAVE_LINUX_FS_H" and inclusion of <linux/fs.h>.
Diffstat (limited to 'nix')
-rw-r--r--nix/libstore/build.cc5
-rw-r--r--nix/libstore/local-store.cc3
2 files changed, 0 insertions, 8 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index c4fc87746a..17e92c68a7 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -51,11 +51,6 @@
#include <sched.h>
#endif
-/* In GNU libc 2.11, <sys/mount.h> does not define `MS_PRIVATE', but
- <linux/fs.h> does. */
-#if !defined MS_PRIVATE && defined HAVE_LINUX_FS_H
-#include <linux/fs.h>
-#endif
#define CHROOT_ENABLED HAVE_CHROOT && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(MS_PRIVATE) && defined(CLONE_NEWNS) && defined(SYS_pivot_root)
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index 3793382361..7a520925e5 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -28,11 +28,8 @@
#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>