recipes: tools/e2fsprogs: apply patch for a correct build
[dragora.git] / patches / e2fsprogs / gnuc-prereq.patch
blob95b8e50a74b9fb9a462f52670746bfec5b281534
1 diff --git a/lib/ext2fs/ext4_acl.h b/lib/ext2fs/ext4_acl.h
2 index 8d4d974..297df1b 100644
3 --- a/lib/ext2fs/ext4_acl.h
4 +++ b/lib/ext2fs/ext4_acl.h
5 @@ -1,3 +1,11 @@
6 +#ifndef __GNUC_PREREQ
7 +# if defined __GNUC__ && defined __GNUC_MINOR__
8 +# define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
9 +# else
10 +# define __GNUC_PREREQ(maj, min) 0
11 +# endif
12 +#endif
15 * Ext4's on-disk acl format. From linux/fs/ext4/acl.h
17 diff --git a/lib/ext2fs/hashmap.h b/lib/ext2fs/hashmap.h
18 index 228f439..fdc8e7f 100644
19 --- a/lib/ext2fs/hashmap.h
20 +++ b/lib/ext2fs/hashmap.h
21 @@ -4,6 +4,14 @@
22 # include <stdlib.h>
23 # include <stdint.h>
25 +#ifndef __GNUC_PREREQ
26 +# if defined __GNUC__ && defined __GNUC_MINOR__
27 +# define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
28 +# else
29 +# define __GNUC_PREREQ(maj, min) 0
30 +# endif
31 +#endif
33 struct ext2fs_hashmap {
34 uint32_t size;
35 uint32_t(*hash)(const void *key, size_t len);