chiark / gitweb /
readahead: bring export definition of sd-readahead in line with sd-daemon
[elogind.git] / src / readahead / sd-readahead.c
index c5cfe6710732c900a459510fd937aefca26ec44e..a3340666dd7326f3bcd8e0f713c563867c474d7d 100644 (file)
 
 #include "sd-readahead.h"
 
+#if (__GNUC__ >= 4)
+#ifdef SD_EXPORT_SYMBOLS
+/* Export symbols */
+#define _sd_export_ __attribute__ ((visibility("default")))
+#else
+/* Don't export the symbols */
+#define _sd_export_ __attribute__ ((visibility("hidden")))
+#endif
+#else
+#define _sd_export_
+#endif
+
 static int touch(const char *path) {
 
 #if !defined(DISABLE_SYSTEMD) && defined(__linux__)
@@ -60,7 +72,7 @@ static int touch(const char *path) {
         return 0;
 }
 
-int sd_readahead(const char *action) {
+_sd_export_ int sd_readahead(const char *action) {
 
         if (!action)
                 return -EINVAL;