summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2013-06-07 04:46:29 +0200
committerGuillem Jover <guillem@hadrons.org>2013-06-08 18:09:36 +0200
commite084ce3fa75d38067c3f0b2a4c73410070742238 (patch)
tree7b7b1206551aa25f2ed39d1e377e8c7c31a60361 /src
parent50e4c55afddad7f1001c80f3682ea7400a808747 (diff)
Specify setproctitle_stub() signature manually if typeof is missing
Do not stop exporting the function in the version node even if typeof is not available, as that would break ABI.
Diffstat (limited to 'src')
-rw-r--r--src/setproctitle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/setproctitle.c b/src/setproctitle.c
index e4f648a..0d97954 100644
--- a/src/setproctitle.c
+++ b/src/setproctitle.c
@@ -257,11 +257,14 @@ setproctitle_impl(const char *fmt, ...)
}
__asm__(".symver setproctitle_impl,setproctitle@@LIBBSD_0.5");
-#ifdef HAVE_TYPEOF
/* The original function introduced in 0.2 was a stub, it only got implemented
* in 0.5, make the implementation available in the old version as an alias
* for code linking against that version, and change the default to use the
* new version, so that new code depends on the implemented version. */
+#ifdef HAVE_TYPEOF
extern typeof(setproctitle_impl) setproctitle_stub __attribute__((alias("setproctitle_impl")));
-__asm__(".symver setproctitle_stub,setproctitle@LIBBSD_0.2");
+#else
+void setproctitle_stub(const char *fmt, ...)
+ __attribute__((alias("setproctitle_impl")));
#endif
+__asm__(".symver setproctitle_stub,setproctitle@LIBBSD_0.2");