Don't define away __attribute__ on gcc
[gitweb.git] / git-compat-util.h
index 96f55547a379bc1bdc488fa4557360bbfd1ae253..01e8695a2db88cb6fa1c80bde7a9740e6996c4c5 100644 (file)
@@ -291,10 +291,12 @@ extern char *gitbasename(char *);
 #else
 #define NORETURN
 #define NORETURN_PTR
+#ifndef __GNUC__
 #ifndef __attribute__
 #define __attribute__(x)
 #endif
 #endif
+#endif
 
 /* The sentinel attribute is valid from gcc version 4.0 */
 #if defined(__GNUC__) && (__GNUC__ >= 4)