summaryrefslogtreecommitdiff
path: root/src/readahead/sd-readahead.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-03 20:34:09 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-03 21:08:57 +0100
commit4f3656e1cec7fe3d7d3537e23a406cb88d734502 (patch)
tree63164a57d40c2dbebd8a37c49f5c453a7d1ef93e /src/readahead/sd-readahead.c
parent4cfc6dbe52e4ff867750ce0d64f09d42c0ea6c27 (diff)
readahead: bring export definition of sd-readahead in line with sd-daemon
Diffstat (limited to 'src/readahead/sd-readahead.c')
-rw-r--r--src/readahead/sd-readahead.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/readahead/sd-readahead.c b/src/readahead/sd-readahead.c
index c5cfe67107..a3340666dd 100644
--- a/src/readahead/sd-readahead.c
+++ b/src/readahead/sd-readahead.c
@@ -37,6 +37,18 @@
#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;