[PATCH 1/2] xz/xz_config.h: Define __always_inline to inline to avoid warnings

Joel Sherrill joel at rtems.org
Wed Apr 5 17:06:14 UTC 2017


---
 cpukit/libmisc/xz/xz_config.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cpukit/libmisc/xz/xz_config.h b/cpukit/libmisc/xz/xz_config.h
index eb9dac1..bb595a3 100644
--- a/cpukit/libmisc/xz/xz_config.h
+++ b/cpukit/libmisc/xz/xz_config.h
@@ -62,6 +62,11 @@ typedef unsigned char bool;
  * NOTE: System headers on GNU/Linux may #define this macro already,
  * so if you want to change it, you need to #undef it first.
  */
+#ifdef __rtems__
+/* The use of __always_inline leads to warnings on RTEMS builds. */
+#undef __always_inline
+#define __always_inline inline
+#else
 #ifndef __always_inline
 #	ifdef __GNUC__
 #		define __always_inline \
@@ -70,6 +75,7 @@ typedef unsigned char bool;
 #		define __always_inline inline
 #	endif
 #endif
+#endif
 
 /* Inline functions to access unaligned unsigned 32-bit integers */
 #ifndef get_unaligned_le32
-- 
1.8.3.1




More information about the devel mailing list