guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/07: daemon: Don't include <linux/fs.h>.


From: guix-commits
Subject: 02/07: daemon: Don't include <linux/fs.h>.
Date: Wed, 13 Nov 2019 17:27:22 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 298fb2907e3f432cea7dee9f58e89ab8d9dbd56f
Author: Ludovic Courtès <address@hidden>
Date:   Wed Nov 13 11:44:34 2019 +0100

    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>.
---
 config-daemon.ac            | 3 ---
 nix/libstore/build.cc       | 5 -----
 nix/libstore/local-store.cc | 3 ---
 3 files changed, 11 deletions(-)

diff --git a/config-daemon.ac b/config-daemon.ac
index bf94815..848e1e5 100644
--- a/config-daemon.ac
+++ b/config-daemon.ac
@@ -115,9 +115,6 @@ if test "x$guix_build_daemon" = "xyes"; then
   dnl to do i686-linux builds on x86_64-linux machines.
   AC_CHECK_HEADERS([sys/personality.h])
 
-  dnl Check for <linux/fs.h> (for immutable file support).
-  AC_CHECK_HEADERS([linux/fs.h])
-
   dnl Determine the appropriate default list of substitute URLs (GnuTLS
   dnl is required so we can default to 'https'.)
   guix_substitute_urls="https://ci.guix.gnu.org";
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index c4fc877..17e92c6 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 3793382..7a52092 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>
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]