mirror of
https://git.yoctoproject.org/poky
synced 2026-05-04 13:39:49 +02:00
mtools: Fix build with clang
Identify with __clang__ to undefine UNUSED (From OE-Core rev: fcede6dd3e44d9f7761d058db76dfaf103b75c6a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
17
meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch
Normal file
17
meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch
Normal file
@@ -0,0 +1,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))
|
||||
@@ -32,6 +32,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
|
||||
file://no-x11.gplv3.patch \
|
||||
file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
|
||||
file://0001-remove-LOCK_NB-to-use-blocking-request.patch \
|
||||
file://clang_UNUSED.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch"
|
||||
|
||||
Reference in New Issue
Block a user