mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Fix symbol definitions for __clock_* functions
__clock_gettime and other __clock_* functions could result in an extra PLT reference within libc.so if it actually gets used. None of the code currently uses them, which is why this probably went unnoticed.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "kernel-posix-cpu-timers.h"
|
||||
|
||||
int
|
||||
clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
|
||||
__clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
|
||||
{
|
||||
/* The clockid_t value is a simple computation from the PID.
|
||||
But we do a clock_getres call to validate it. */
|
||||
@@ -46,4 +46,4 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
|
||||
else
|
||||
return INTERNAL_SYSCALL_ERRNO (r, err);
|
||||
}
|
||||
strong_alias (clock_getcpuclockid, __clock_getcpuclockid)
|
||||
weak_alias (__clock_getcpuclockid, clock_getcpuclockid)
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
/* We can simply use the syscall. The CPU clocks are not supported
|
||||
with this function. */
|
||||
int
|
||||
clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
|
||||
struct timespec *rem)
|
||||
__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
|
||||
struct timespec *rem)
|
||||
{
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
int r;
|
||||
@@ -52,4 +52,4 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
|
||||
return (INTERNAL_SYSCALL_ERROR_P (r, err)
|
||||
? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
|
||||
}
|
||||
strong_alias (clock_nanosleep, __clock_nanosleep)
|
||||
weak_alias (__clock_nanosleep, clock_nanosleep)
|
||||
|
||||
Reference in New Issue
Block a user