diff options
Diffstat (limited to 'sysdeps/unix/clock_nanosleep.c')
-rw-r--r-- | sysdeps/unix/clock_nanosleep.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/unix/clock_nanosleep.c b/sysdeps/unix/clock_nanosleep.c index b27608570c..6a477520d1 100644 --- a/sysdeps/unix/clock_nanosleep.c +++ b/sysdeps/unix/clock_nanosleep.c @@ -20,6 +20,7 @@ #include <errno.h> #include <time.h> #include <sysdep-cancel.h> +#include <shlib-compat.h> /* This implementation assumes that these is only a `nanosleep' system call. So we have to remap all other activities. */ @@ -76,4 +77,11 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, return __nanosleep (req, rem), 0 ? errno : 0; } -weak_alias (__clock_nanosleep, clock_nanosleep) + +versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17); +/* clock_nanosleep moved to libc in version 2.17; + old binaries may expect the symbol version it had in librt. */ +#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17) +strong_alias (__clock_nanosleep, __clock_nanosleep_2); +compat_symbol (libc, __clock_nanosleep_2, clock_nanosleep, GLIBC_2_2); +#endif |