Patchwork [v2,5/5] Avoid redefining inline

login
register
mail settings
Submitter Blue Swirl
Date July 8, 2012, 12:23 p.m.
Message ID <9e0182964235bf9670eb3b7c1800c75cb0dbff27.1341749912.git.blauwirbel@gmail.com>
Download mbox | patch
Permalink /patch/169639/
State New
Headers show

Comments

Blue Swirl - July 8, 2012, 12:23 p.m.
From: Blue Swirl <blauwirbel@gmail.com>

System headers (e.g. gutils.h) may define 'inline', #undefine it
before #defining.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 osdep.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/osdep.h b/osdep.h
index 3ea4af0..1e15a4b 100644
--- a/osdep.h
+++ b/osdep.h
@@ -70,10 +70,12 @@  typedef signed int              int_fast16_t;
 #ifndef always_inline
 #if !((__GNUC__ < 3) || defined(__APPLE__))
 #ifdef __OPTIMIZE__
+#undef inline
 #define inline __attribute__ (( always_inline )) __inline__
 #endif
 #endif
 #else
+#undef inline
 #define inline always_inline
 #endif