summaryrefslogtreecommitdiff
path: root/lib/compiler.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-05 13:30:42 -0400
committerGitHub <noreply@github.com>2019-06-05 13:30:42 -0400
commit695a52fd5e918906098f863829b5ca91dbfce08f (patch)
treebb67fc10230a3038005aafc36864f163be44f86f /lib/compiler.h
parent9e8238f5d6afdadd72fb81d3c324c17f53b19e7a (diff)
parent2a37d6c5dfdd5a32b0c7df5715156e1591f7cbfa (diff)
Merge pull request #4333 from opensourcerouting/printfrr
printfrr() world domination tour
Diffstat (limited to 'lib/compiler.h')
-rw-r--r--lib/compiler.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compiler.h b/lib/compiler.h
index c2e57db7f8..7509428220 100644
--- a/lib/compiler.h
+++ b/lib/compiler.h
@@ -50,6 +50,16 @@ extern "C" {
#endif
#endif
+#if !defined(__GNUC__)
+#error module code needs GCC visibility extensions
+#elif __GNUC__ < 4
+#error module code needs GCC visibility extensions
+#else
+# define DSO_PUBLIC __attribute__ ((visibility ("default")))
+# define DSO_SELF __attribute__ ((visibility ("protected")))
+# define DSO_LOCAL __attribute__ ((visibility ("hidden")))
+#endif
+
#ifdef __sun
/* Solaris doesn't do constructor priorities due to linker restrictions */
#undef _CONSTRUCTOR