summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Boyce <boyski@users.sourceforge.net>2011-09-18 21:27:25 -0400
committerDavid Boyce <boyski@users.sourceforge.net>2011-09-18 21:27:25 -0400
commitd2a1861ea1fde6c1f4fe68aa4cc7f3602db92b1f (patch)
tree14bf6d0de5e90b9e5facd864d5fedd85e4eaade7
parent3f3f6225f8237e974b135de30eaac731c929936e (diff)
downloadlibgit2-d2a1861ea1fde6c1f4fe68aa4cc7f3602db92b1f.tar.gz
Don't use '__attribute__ visibility' with gcc unless it's at
version 4 or better.
-rw-r--r--include/git2/common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index 58cb1f200..4995473aa 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -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 \