]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Specify setproctitle_stub() signature manually if typeof is missing
authorGuillem Jover <guillem@hadrons.org>
Fri, 7 Jun 2013 02:46:29 +0000 (04:46 +0200)
committerGuillem Jover <guillem@hadrons.org>
Sat, 8 Jun 2013 16:09:36 +0000 (18:09 +0200)
Do not stop exporting the function in the version node even if typeof
is not available, as that would break ABI.

src/setproctitle.c

index e4f648a3c799e73a6321ffd60be275bbb0e4e160..0d979543b242e2f9da8ac9b9f29a2368bd35e7af 100644 (file)
@@ -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");