From 10cada1b8d4b133baca0f6c18e71f15a7b790095 Mon Sep 17 00:00:00 2001 From: Teufelchen1 Date: Mon, 17 Apr 2023 15:01:49 +0200 Subject: [PATCH] native/syscalls: rename real_clock_gettime to clock_gettime --- cpu/native/include/native_internal.h | 2 -- cpu/native/periph/timer.c | 2 +- cpu/native/syscalls.c | 9 --------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/cpu/native/include/native_internal.h b/cpu/native/include/native_internal.h index 3ad2d968a286..7784cabaec1b 100644 --- a/cpu/native/include/native_internal.h +++ b/cpu/native/include/native_internal.h @@ -148,8 +148,6 @@ extern mode_t (*real_umask)(mode_t cmask); extern ssize_t (*real_writev)(int fildes, const struct iovec *iov, int iovcnt); extern ssize_t (*real_send)(int sockfd, const void *buf, size_t len, int flags); -extern int (*real_clock_gettime)(clockid_t clk_id, struct timespec *tp); - /** * data structures */ diff --git a/cpu/native/periph/timer.c b/cpu/native/periph/timer.c index d0c27b11306d..229ae6efaf28 100644 --- a/cpu/native/periph/timer.c +++ b/cpu/native/periph/timer.c @@ -204,7 +204,7 @@ unsigned int timer_read(tim_t dev) _native_syscall_enter(); - if (real_clock_gettime(CLOCK_MONOTONIC, &t) == -1) { + if (clock_gettime(CLOCK_MONOTONIC, &t) == -1) { err(EXIT_FAILURE, "timer_read: clock_gettime"); } diff --git a/cpu/native/syscalls.c b/cpu/native/syscalls.c index 2840824f1415..5c57cbb6c512 100644 --- a/cpu/native/syscalls.c +++ b/cpu/native/syscalls.c @@ -106,11 +106,6 @@ mode_t (*real_umask)(mode_t cmask); ssize_t (*real_writev)(int fildes, const struct iovec *iov, int iovcnt); ssize_t (*real_send)(int sockfd, const void *buf, size_t len, int flags); -#ifdef __MACH__ -#else -int (*real_clock_gettime)(clockid_t clk_id, struct timespec *tp); -#endif - void _native_syscall_enter(void) { _native_in_syscall++; @@ -553,8 +548,4 @@ void _native_init_syscalls(void) *(void **)(&real_ftell) = dlsym(RTLD_NEXT, "ftell"); *(void **)(&real_fputc) = dlsym(RTLD_NEXT, "fputc"); *(void **)(&real_fgetc) = dlsym(RTLD_NEXT, "fgetc"); -#ifdef __MACH__ -#else - *(void **)(&real_clock_gettime) = dlsym(RTLD_NEXT, "clock_gettime"); -#endif }