]> git.proxmox.com Git - libgit2.git/commitdiff
Don't use '__attribute__ visibility' with gcc unless it's at
authorDavid Boyce <boyski@users.sourceforge.net>
Mon, 19 Sep 2011 01:27:25 +0000 (21:27 -0400)
committerDavid Boyce <boyski@users.sourceforge.net>
Mon, 19 Sep 2011 01:27:25 +0000 (21:27 -0400)
version 4 or better.

include/git2/common.h

index 58cb1f200c7ec2e94d8a4981b181ba367e53d4b7..4995473aa81c87e16a76164cbccb7cf2a0248c2f 100644 (file)
@@ -40,7 +40,7 @@
 #endif
 
 /** Declare a public function exported for application use. */
-#ifdef __GNUC__
+#if __GNUC__ >= 4
 # define GIT_EXTERN(type) extern \
                          __attribute__((visibility("default"))) \
                          type
@@ -51,7 +51,7 @@
 #endif
 
 /** Declare a public TLS symbol exported for application use. */
-#ifdef __GNUC__
+#if __GNUC__ >= 4
 # define GIT_EXTERN_TLS(type) extern \
                              __attribute__((visibility("default"))) \
                              GIT_TLS \