hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Undefine UNUSED macros with clang
 
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Index: mtools-4.0.18/sysincludes.h
===================================================================
--- mtools-4.0.18.orig/sysincludes.h
+++ mtools-4.0.18/sysincludes.h
@@ -101,7 +101,7 @@ typedef void *caddr_t;
 #if defined __GNUC__ && defined __STDC__
 /* gcc -traditional doesn't have PACKED, UNUSED and NORETURN */
 # define PACKED __attribute__ ((packed))
-# if __GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3
+# if (__GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3) && !defined(__clang__)
 /* gcc 2.6.3 doesn't have "unused" */        /* mool */
 #  define UNUSED(x) x __attribute__ ((unused));x
 #  define UNUSEDP __attribute__ ((unused))