]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: include sys/mount.h on Linux only
authorKarel Zak <kzak@redhat.com>
Tue, 29 May 2018 08:06:00 +0000 (10:06 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 13:58:52 +0000 (15:58 +0200)
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=891812
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/libmount.h.in

index 11fd759fa431d67bcdd9601974bf5f62c4054841..c61514b59110e7193c429159e85e088ad27ca72a 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  * may be already defined by linux/fs.h or another file -- in this case we
  * don't want to include sys/mount.h at all to avoid collisions.
  */
-#ifndef MS_RDONLY
+#if defined(__linux__) && !defined(MS_RDONLY)
 # include <sys/mount.h>
 #endif