include: The visibility attribute is supported only by gcc >= 3.3.
diff --git a/include/winnt.h b/include/winnt.h
index d2c6452..77bf11e 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -136,13 +136,13 @@
# define DECLSPEC_EXPORT __declspec(dllexport)
#elif defined(__MINGW32__)
# define DECLSPEC_EXPORT __attribute__((dllexport))
-#elif defined(__GNUC__) && (__GNUC__ > 2)
+#elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
# define DECLSPEC_EXPORT __attribute__((visibility ("default")))
#else
# define DECLSPEC_EXPORT
#endif
-#if defined(__GNUC__) && (__GNUC__ > 2)
+#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
# define DECLSPEC_HIDDEN __attribute__((visibility ("hidden")))
#else
# define DECLSPEC_HIDDEN