Remove weak aliases from musl

This commit is contained in:
Alexey Milovidov 2020-03-03 04:59:57 +03:00
parent cd4f7f26e8
commit 826f6a65c4
3 changed files with 2 additions and 11 deletions

View File

@ -2,7 +2,6 @@
#include <stdint.h> #include <stdint.h>
#include <time.h> #include <time.h>
#include "atomic.h" #include "atomic.h"
#include "musl_features.h"
#include "syscall.h" #include "syscall.h"
#ifdef VDSO_CGT_SYM #ifdef VDSO_CGT_SYM
@ -54,7 +53,7 @@ static void *volatile vdso_func = (void *)cgt_init;
#endif #endif
int __clock_gettime(clockid_t clk, struct timespec *ts) int clock_gettime(clockid_t clk, struct timespec *ts)
{ {
int r; int r;
@ -104,5 +103,3 @@ int __clock_gettime(clockid_t clk, struct timespec *ts)
return __syscall_ret(r); return __syscall_ret(r);
#endif #endif
} }
weak_alias(__clock_gettime, clock_gettime);

View File

@ -1,10 +1,9 @@
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
#include <time.h> #include <time.h>
#include "musl_features.h"
#include "syscall.h" #include "syscall.h"
int __clock_nanosleep(clockid_t clk, int flags, const struct timespec * req, struct timespec * rem) int clock_nanosleep(clockid_t clk, int flags, const struct timespec * req, struct timespec * rem)
{ {
if (clk == CLOCK_THREAD_CPUTIME_ID) if (clk == CLOCK_THREAD_CPUTIME_ID)
return EINVAL; return EINVAL;
@ -23,5 +22,3 @@ int __clock_nanosleep(clockid_t clk, int flags, const struct timespec * req, str
pthread_setcanceltype(old_cancel_type, NULL); pthread_setcanceltype(old_cancel_type, NULL);
return status; return status;
} }
weak_alias(__clock_nanosleep, clock_nanosleep);

View File

@ -2,7 +2,4 @@
#define weak __attribute__((__weak__)) #define weak __attribute__((__weak__))
#define hidden __attribute__((__visibility__("hidden"))) #define hidden __attribute__((__visibility__("hidden")))
#define weak_alias(old, new) \
extern __typeof(old) new __attribute__((__weak__, __alias__(#old)))
#define predict_false(x) __builtin_expect(x, 0) #define predict_false(x) __builtin_expect(x, 0)