010-old-libmagic.patch 876 B

12345678910111213141516171819202122232425
  1. From b482eb7af94885b6bbad9329e40702c958d5b448 Mon Sep 17 00:00:00 2001
  2. From: Hauke Mehrtens <hauke@hauke-m.de>
  3. Date: Thu, 30 Jun 2016 19:53:03 +0200
  4. Subject: [PATCH] fix build problem with very old libmagic
  5. The libmagic shipped with RedHat 5 does not define
  6. MAGIC_NO_CHECK_ELF and MAGIC_NO_CHECK_COMPRESS. e2fsprogs should
  7. check for that otherwise the build will fail.
  8. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  9. ---
  10. lib/support/plausible.c | 2 +-
  11. 1 file changed, 1 insertion(+), 1 deletion(-)
  12. --- a/lib/support/plausible.c
  13. +++ b/lib/support/plausible.c
  14. @@ -247,7 +247,7 @@ int check_plausibility(const char *devic
  15. return 0;
  16. }
  17. -#ifdef HAVE_MAGIC_H
  18. +#if defined(HAVE_MAGIC_H) && defined(MAGIC_NO_CHECK_ELF) && defined(MAGIC_NO_CHECK_COMPRESS)
  19. if ((flags & CHECK_FS_EXIST) &&
  20. !getenv("E2FSPROGS_LIBMAGIC_SUPPRESS") &&
  21. magic_library_available()) {