aboutsummaryrefslogtreecommitdiffstats
path: root/tools/e2fsprogs/patches/010-old-libmagic.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke.mehrtens@intel.com>2016-06-24 17:37:40 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2016-06-30 20:51:53 +0200
commitd635ef50c5cb9aaca718b6418feea378b450c3a8 (patch)
treebfa10c1d5d4e7e733ca5f110bb10a69e2ce5c9ed /tools/e2fsprogs/patches/010-old-libmagic.patch
parentffcae8b494df37f887ad96eaaccdb93c1a401787 (diff)
downloadupstream-d635ef50c5cb9aaca718b6418feea378b450c3a8.tar.gz
upstream-d635ef50c5cb9aaca718b6418feea378b450c3a8.tar.bz2
upstream-d635ef50c5cb9aaca718b6418feea378b450c3a8.zip
e2fsprogs: fix build problem with very old libmagic
The libmagic shipped with RedHat 5 does not define MAGIC_NO_CHECK_ELF and MAGIC_NO_CHECK_COMPRESS. e2fsprogs should check for that, otherwise the build will fail. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
Diffstat (limited to 'tools/e2fsprogs/patches/010-old-libmagic.patch')
-rw-r--r--tools/e2fsprogs/patches/010-old-libmagic.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/e2fsprogs/patches/010-old-libmagic.patch b/tools/e2fsprogs/patches/010-old-libmagic.patch
new file mode 100644
index 0000000000..9156b73372
--- /dev/null
+++ b/tools/e2fsprogs/patches/010-old-libmagic.patch
@@ -0,0 +1,25 @@
+From b482eb7af94885b6bbad9329e40702c958d5b448 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Thu, 30 Jun 2016 19:53:03 +0200
+Subject: [PATCH] fix build problem with very old libmagic
+
+The libmagic shipped with RedHat 5 does not define
+MAGIC_NO_CHECK_ELF and MAGIC_NO_CHECK_COMPRESS. e2fsprogs should
+check for that otherwise the build will fail.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ lib/support/plausible.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/support/plausible.c
++++ b/lib/support/plausible.c
+@@ -247,7 +247,7 @@ int check_plausibility(const char *devic
+ return 0;
+ }
+
+-#ifdef HAVE_MAGIC_H
++#if defined(HAVE_MAGIC_H) && defined(MAGIC_NO_CHECK_ELF) && defined(MAGIC_NO_CHECK_COMPRESS)
+ if ((flags & CHECK_FS_EXIST) &&
+ !getenv("E2FSPROGS_LIBMAGIC_SUPPRESS") &&
+ magic_library_available()) {