summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Norbye <trond.norbye@gmail.com>2011-08-08 22:17:59 +0200
committerTrond Norbye <trond.norbye@gmail.com>2011-08-08 22:17:59 +0200
commitda3493dfda256c2916ce302ba0970e79f505c18c (patch)
treef150f9d63d48b9c4af8c71eda4f60ce97409aeec
parent67590c2101bf6939a80032b1a038135d40f8ea69 (diff)
downloadmemcached-da3493dfda256c2916ce302ba0970e79f505c18c.tar.gz
Check for the existence of __builtin_expect before defining it
Just testing for gcc might not be sufficient
-rw-r--r--daemon/memcached.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/memcached.h b/daemon/memcached.h
index 232d73e..b592b7b 100644
--- a/daemon/memcached.h
+++ b/daemon/memcached.h
@@ -480,7 +480,7 @@ bool conn_add_tap_client(conn *c);
bool conn_setup_tap_stream(conn *c);
/* If supported, give compiler hints for branch prediction. */
-#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+#if !defined(__builtin_expect) && (!defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96))
#define __builtin_expect(x, expected_value) (x)
#endif