diff options
author | David P <megver83@parabola.nu> | 2018-05-09 14:57:32 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2018-05-09 14:57:44 -0300 |
commit | 0c8c2320e0cd3ae565dadc3b4df1c4f17cb86e72 (patch) | |
tree | 21dccf7c5587b6d192b0d2cbcace9ff1120f8eca /nonsystemd/util-linux/0002-libmount_include_sys_mount_h_only_if_necessary.patch | |
parent | 5828b2142fce02177c256353002e3520ef92f254 (diff) | |
download | abslibre-0c8c2320e0cd3ae565dadc3b4df1c4f17cb86e72.tar.gz abslibre-0c8c2320e0cd3ae565dadc3b4df1c4f17cb86e72.tar.bz2 abslibre-0c8c2320e0cd3ae565dadc3b4df1c4f17cb86e72.zip |
copy pcr/util-linux-nosystemd to nonsystemd/util-linux 2.32-1.nonsystemd1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/util-linux/0002-libmount_include_sys_mount_h_only_if_necessary.patch')
-rw-r--r-- | nonsystemd/util-linux/0002-libmount_include_sys_mount_h_only_if_necessary.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/nonsystemd/util-linux/0002-libmount_include_sys_mount_h_only_if_necessary.patch b/nonsystemd/util-linux/0002-libmount_include_sys_mount_h_only_if_necessary.patch new file mode 100644 index 000000000..0c478f622 --- /dev/null +++ b/nonsystemd/util-linux/0002-libmount_include_sys_mount_h_only_if_necessary.patch @@ -0,0 +1,54 @@ +From 061d1a51097c3c025ff46173f10aa135f9a610d4 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 22 Mar 2018 14:05:17 +0100 +Subject: libmount: include sys/mount.h only if necessary + +Addresses: https://github.com/systemd/systemd/issues/8507 +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + libmount/src/libmount.h.in | 9 ++++++++- + sys-utils/fstrim.c | 4 +--- + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in +index 8f323fcbf..11fd759fa 100644 +--- a/libmount/src/libmount.h.in ++++ b/libmount/src/libmount.h.in +@@ -28,7 +28,14 @@ extern "C" { + #include <stdio.h> + #include <mntent.h> + #include <sys/types.h> +-#include <sys/mount.h> ++ ++/* Make sure libc MS_* definitions are used by default. Note that MS_* flags ++ * 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 ++# include <sys/mount.h> ++#endif + + #define LIBMOUNT_VERSION "@LIBMOUNT_VERSION@" + #define LIBMOUNT_MAJOR_VERSION @LIBMOUNT_MAJOR_VERSION@ +diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c +index 53ac594c0..ce52063e1 100644 +--- a/sys-utils/fstrim.c ++++ b/sys-utils/fstrim.c +@@ -35,6 +35,7 @@ + + #include <sys/ioctl.h> + #include <sys/stat.h> ++#include <linux/fs.h> + + #include "nls.h" + #include "strutils.h" +@@ -46,9 +47,6 @@ + #include <libmount.h> + + +-/* We cannot include linux/fs.h due to MS_* constants collision with +- * sys/mount.h (and libmount.h) +- */ + #ifndef FITRIM + struct fstrim_range { + uint64_t start; |