From 298fb2907e3f432cea7dee9f58e89ab8d9dbd56f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 13 Nov 2019 11:44:34 +0100 Subject: daemon: Don't include . MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of GNU libc 2.29, declares all the constants and functions we need, so there's no use in including 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 . * nix/libstore/build.cc: Remove conditional inclusion of . * nix/libstore/local-store.cc: Remove "#if HAVE_LINUX_FS_H" and inclusion of . --- nix/libstore/build.cc | 5 ----- nix/libstore/local-store.cc | 3 --- 2 files changed, 8 deletions(-) (limited to 'nix') 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 #endif -/* In GNU libc 2.11, does not define `MS_PRIVATE', but - does. */ -#if !defined MS_PRIVATE && defined HAVE_LINUX_FS_H -#include -#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 #endif -#if HAVE_LINUX_FS_H -#include #include #include -#endif #include -- cgit v1.2.3