]> git.saurik.com Git - redis.git/commitdiff
Merge pull request #362 from fawek/mac-build-fix
authorSalvatore Sanfilippo <antirez@gmail.com>
Sun, 26 Feb 2012 15:18:43 +0000 (07:18 -0800)
committerSalvatore Sanfilippo <antirez@gmail.com>
Sun, 26 Feb 2012 15:18:43 +0000 (07:18 -0800)
Fix the build on Mac OS X, where features.h is non-existent

src/config.h

index 2bf0f93403198876226d92f9ed5f3a982c215b75..6a69364a97158a2d7f46b82449046dadb200a9f2 100644 (file)
 #endif
 
 #if (__i386 || __amd64) && __GNUC__
-    #include <features.h>
-
-    #if __GNUC_PREREQ(4,1)
-        #define HAVE_ATOMIC
-    #endif
+#define GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#if GNUC_VERSION >= 40100
+#define HAVE_ATOMIC
+#endif
 #endif