From 680765abece33eab94e7054de4d1fd43373f1dd6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 25 Oct 2011 19:18:41 +0000 Subject: [PATCH] http: fix gcc 3.x build, don't use always_inline --- src/node_http_parser.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 1cc2029f9a..58368e4e1b 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -103,12 +103,18 @@ static char* current_buffer_data; static size_t current_buffer_len; +// gcc 3.x knows the always_inline attribute but fails at build time with a +// "sorry, unimplemented: inlining failed" error when compiling at -O0 #if defined(__GNUC__) -#define always_inline __attribute__((always_inline)) +# if __GNUC__ >= 4 +# define always_inline __attribute__((always_inline)) +# else +# define always_inline inline +# endif #elif defined(_MSC_VER) -#define always_inline __forceinline +# define always_inline __forceinline #else -#define always_inline +# define always_inline #endif