From 5b7f359fe964ca99ab496072f0d77d9a707bbdc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C3=ADas=20Fonzo?= Date: Sun, 30 Dec 2018 20:22:37 -0300 Subject: [PATCH] recipes: tools/e2fsprogs: apply patch for a correct build --- patches/e2fsprogs/gnuc-prereq.patch | 35 +++++++++++++++++++++++++++++++++++ recipes/tools/e2fsprogs/recipe | 7 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 patches/e2fsprogs/gnuc-prereq.patch diff --git a/patches/e2fsprogs/gnuc-prereq.patch b/patches/e2fsprogs/gnuc-prereq.patch new file mode 100644 index 00000000..95b8e50a --- /dev/null +++ b/patches/e2fsprogs/gnuc-prereq.patch @@ -0,0 +1,35 @@ +diff --git a/lib/ext2fs/ext4_acl.h b/lib/ext2fs/ext4_acl.h +index 8d4d974..297df1b 100644 +--- a/lib/ext2fs/ext4_acl.h ++++ b/lib/ext2fs/ext4_acl.h +@@ -1,3 +1,11 @@ ++#ifndef __GNUC_PREREQ ++# if defined __GNUC__ && defined __GNUC_MINOR__ ++# define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) ++# else ++# define __GNUC_PREREQ(maj, min) 0 ++# endif ++#endif ++ + /* + * Ext4's on-disk acl format. From linux/fs/ext4/acl.h + */ +diff --git a/lib/ext2fs/hashmap.h b/lib/ext2fs/hashmap.h +index 228f439..fdc8e7f 100644 +--- a/lib/ext2fs/hashmap.h ++++ b/lib/ext2fs/hashmap.h +@@ -4,6 +4,14 @@ + # include + # include + ++#ifndef __GNUC_PREREQ ++# if defined __GNUC__ && defined __GNUC_MINOR__ ++# define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) ++# else ++# define __GNUC_PREREQ(maj, min) 0 ++# endif ++#endif ++ + struct ext2fs_hashmap { + uint32_t size; + uint32_t(*hash)(const void *key, size_t len); diff --git a/recipes/tools/e2fsprogs/recipe b/recipes/tools/e2fsprogs/recipe index 1b5a5663..0d71f8d9 100644 --- a/recipes/tools/e2fsprogs/recipe +++ b/recipes/tools/e2fsprogs/recipe @@ -16,7 +16,7 @@ program=e2fsprogs version=1.44.5 -release=1 +release=2 # Set 'outdir' for a nice and well-organized output directory outdir="${outdir}/${arch}/tools" @@ -51,6 +51,11 @@ build() # Set sane permissions chmod -R u+w,go-w,a+rX-s . + # Apply missing patch to upstream (Thanks to "Alpine Linux") + # This patch seems a complement for: + # http://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=98c6113b414782eb5bfcb67c33d09950ed203f20 + patch -Np1 -i "${worktree}/patches/e2fsprogs/gnuc-prereq.patch" + ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \ $configure_args \ --libdir=/usr/lib${libSuffix} \ -- 2.11.4.GIT