summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch
blob: 6bb9d6a3dae11657c471f6f5275dcfed0a177041 (plain)
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))