]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/posix/clock_getres.c
Finish move of clock_* functions to libc. [BZ #24959]
[thirdparty/glibc.git] / sysdeps / posix / clock_getres.c
index 01024a3f558832841c1220df81e45f2d52a05ea2..e529cadb1f827946a58a3c3f21104ecfd4a8503e 100644 (file)
@@ -22,7 +22,7 @@
 #include <unistd.h>
 #include <sys/param.h>
 #include <libc-internal.h>
-
+#include <shlib-compat.h>
 
 static inline int
 realtime_getres (struct timespec *res)
@@ -62,4 +62,11 @@ __clock_getres (clockid_t clock_id, struct timespec *res)
 
   return retval;
 }
-weak_alias (__clock_getres, clock_getres)
+
+versioned_symbol (libc, __clock_getres, clock_getres, GLIBC_2_17);
+/* clock_getres 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_getres, __clock_getres_2);
+compat_symbol (libc, __clock_getres_2, clock_getres, GLIBC_2_2);
+#endif