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