aboutsummaryrefslogtreecommitdiffstats
path: root/main/e2fsprogs/gnuc-prereq.patch
blob: 95b8e50a74b9fb9a462f52670746bfec5b281534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 <stdlib.h>
 # include <stdint.h>
 
+#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);