From b4712ba445a5cb589d1ac37785c29164cd3cf1f9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 5 Feb 2020 09:55:02 -0500 Subject: [PATCH] remove legacy time32 timer[fd] syscalls from public syscall.h this extends commit 5a105f19b5aae79dd302899e634b6b18b3dcd0d6, removing timer[fd]_settime and timer[fd]_gettime. the timerfd ones are likely to have been used in software that started using them before it could rely on libc exposing functions. --- arch/arm/bits/syscall.h.in | 8 ++++---- arch/i386/bits/syscall.h.in | 8 ++++---- arch/m68k/bits/syscall.h.in | 8 ++++---- arch/microblaze/bits/syscall.h.in | 8 ++++---- arch/mips/bits/syscall.h.in | 8 ++++---- arch/mipsn32/bits/syscall.h.in | 8 ++++---- arch/or1k/bits/syscall.h.in | 8 ++++---- arch/powerpc/bits/syscall.h.in | 8 ++++---- arch/sh/bits/syscall.h.in | 8 ++++---- src/internal/syscall.h | 16 ++++++++++++++++ 10 files changed, 52 insertions(+), 36 deletions(-) diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in index 82757a96..11d67763 100644 --- a/arch/arm/bits/syscall.h.in +++ b/arch/arm/bits/syscall.h.in @@ -211,8 +211,8 @@ #define __NR_remap_file_pages 253 #define __NR_set_tid_address 256 #define __NR_timer_create 257 -#define __NR_timer_settime 258 -#define __NR_timer_gettime 259 +#define __NR_timer_settime32 258 +#define __NR_timer_gettime32 259 #define __NR_timer_getoverrun 260 #define __NR_timer_delete 261 #define __NR_clock_settime32 262 @@ -308,8 +308,8 @@ #define __NR_timerfd_create 350 #define __NR_eventfd 351 #define __NR_fallocate 352 -#define __NR_timerfd_settime 353 -#define __NR_timerfd_gettime 354 +#define __NR_timerfd_settime32 353 +#define __NR_timerfd_gettime32 354 #define __NR_signalfd4 355 #define __NR_eventfd2 356 #define __NR_epoll_create1 357 diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in index a04d69dc..1ae4e48a 100644 --- a/arch/i386/bits/syscall.h.in +++ b/arch/i386/bits/syscall.h.in @@ -257,8 +257,8 @@ #define __NR_remap_file_pages 257 #define __NR_set_tid_address 258 #define __NR_timer_create 259 -#define __NR_timer_settime (__NR_timer_create+1) -#define __NR_timer_gettime (__NR_timer_create+2) +#define __NR_timer_settime32 (__NR_timer_create+1) +#define __NR_timer_gettime32 (__NR_timer_create+2) #define __NR_timer_getoverrun (__NR_timer_create+3) #define __NR_timer_delete (__NR_timer_create+4) #define __NR_clock_settime32 (__NR_timer_create+5) @@ -322,8 +322,8 @@ #define __NR_timerfd_create 322 #define __NR_eventfd 323 #define __NR_fallocate 324 -#define __NR_timerfd_settime 325 -#define __NR_timerfd_gettime 326 +#define __NR_timerfd_settime32 325 +#define __NR_timerfd_gettime32 326 #define __NR_signalfd4 327 #define __NR_eventfd2 328 #define __NR_epoll_create1 329 diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in index 5aa5695d..ddfa72e4 100644 --- a/arch/m68k/bits/syscall.h.in +++ b/arch/m68k/bits/syscall.h.in @@ -235,8 +235,8 @@ #define __NR_remap_file_pages 252 #define __NR_set_tid_address 253 #define __NR_timer_create 254 -#define __NR_timer_settime 255 -#define __NR_timer_gettime 256 +#define __NR_timer_settime32 255 +#define __NR_timer_gettime32 256 #define __NR_timer_getoverrun 257 #define __NR_timer_delete 258 #define __NR_clock_settime32 259 @@ -300,8 +300,8 @@ #define __NR_timerfd_create 318 #define __NR_eventfd 319 #define __NR_fallocate 320 -#define __NR_timerfd_settime 321 -#define __NR_timerfd_gettime 322 +#define __NR_timerfd_settime32 321 +#define __NR_timerfd_gettime32 322 #define __NR_signalfd4 323 #define __NR_eventfd2 324 #define __NR_epoll_create1 325 diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in index 7476ba2f..963386a8 100644 --- a/arch/microblaze/bits/syscall.h.in +++ b/arch/microblaze/bits/syscall.h.in @@ -255,8 +255,8 @@ #define __NR_remap_file_pages 257 #define __NR_set_tid_address 258 #define __NR_timer_create 259 -#define __NR_timer_settime 260 -#define __NR_timer_gettime 261 +#define __NR_timer_settime32 260 +#define __NR_timer_gettime32 261 #define __NR_timer_getoverrun 262 #define __NR_timer_delete 263 #define __NR_clock_settime32 264 @@ -320,8 +320,8 @@ #define __NR_eventfd 323 #define __NR_fallocate 324 #define __NR_semtimedop 325 -#define __NR_timerfd_settime 326 -#define __NR_timerfd_gettime 327 +#define __NR_timerfd_settime32 326 +#define __NR_timerfd_gettime32 327 #define __NR_semctl 328 #define __NR_semget 329 #define __NR_semop 330 diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in index 33532fcd..86251bf3 100644 --- a/arch/mips/bits/syscall.h.in +++ b/arch/mips/bits/syscall.h.in @@ -256,8 +256,8 @@ #define __NR_statfs64 4255 #define __NR_fstatfs64 4256 #define __NR_timer_create 4257 -#define __NR_timer_settime 4258 -#define __NR_timer_gettime 4259 +#define __NR_timer_settime32 4258 +#define __NR_timer_gettime32 4259 #define __NR_timer_getoverrun 4260 #define __NR_timer_delete 4261 #define __NR_clock_settime32 4262 @@ -319,8 +319,8 @@ #define __NR_eventfd 4319 #define __NR_fallocate 4320 #define __NR_timerfd_create 4321 -#define __NR_timerfd_gettime 4322 -#define __NR_timerfd_settime 4323 +#define __NR_timerfd_gettime32 4322 +#define __NR_timerfd_settime32 4323 #define __NR_signalfd4 4324 #define __NR_eventfd2 4325 #define __NR_epoll_create1 4326 diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in index 456419ce..2ad48d10 100644 --- a/arch/mipsn32/bits/syscall.h.in +++ b/arch/mipsn32/bits/syscall.h.in @@ -219,8 +219,8 @@ #define __NR_fstatfs64 6218 #define __NR_sendfile64 6219 #define __NR_timer_create 6220 -#define __NR_timer_settime 6221 -#define __NR_timer_gettime 6222 +#define __NR_timer_settime32 6221 +#define __NR_timer_gettime32 6222 #define __NR_timer_getoverrun 6223 #define __NR_timer_delete 6224 #define __NR_clock_settime32 6225 @@ -282,8 +282,8 @@ #define __NR_eventfd 6282 #define __NR_fallocate 6283 #define __NR_timerfd_create 6284 -#define __NR_timerfd_gettime 6285 -#define __NR_timerfd_settime 6286 +#define __NR_timerfd_gettime32 6285 +#define __NR_timerfd_settime32 6286 #define __NR_signalfd4 6287 #define __NR_eventfd2 6288 #define __NR_epoll_create1 6289 diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in index bb03cb94..e9c925e4 100644 --- a/arch/or1k/bits/syscall.h.in +++ b/arch/or1k/bits/syscall.h.in @@ -85,8 +85,8 @@ #define __NR_fdatasync 83 #define __NR_sync_file_range 84 #define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 +#define __NR_timerfd_settime32 86 +#define __NR_timerfd_gettime32 87 #define __NR_utimensat 88 #define __NR_acct 89 #define __NR_capget 90 @@ -107,9 +107,9 @@ #define __NR_init_module 105 #define __NR_delete_module 106 #define __NR_timer_create 107 -#define __NR_timer_gettime 108 +#define __NR_timer_gettime32 108 #define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 +#define __NR_timer_settime32 110 #define __NR_timer_delete 111 #define __NR_clock_settime32 112 #define __NR_clock_gettime32 113 diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in index 30002fdb..8d4f79b5 100644 --- a/arch/powerpc/bits/syscall.h.in +++ b/arch/powerpc/bits/syscall.h.in @@ -238,8 +238,8 @@ #define __NR_epoll_wait 238 #define __NR_remap_file_pages 239 #define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 +#define __NR_timer_settime32 241 +#define __NR_timer_gettime32 242 #define __NR_timer_getoverrun 243 #define __NR_timer_delete 244 #define __NR_clock_settime32 245 @@ -307,8 +307,8 @@ #define __NR_sync_file_range2 308 #define __NR_fallocate 309 #define __NR_subpage_prot 310 -#define __NR_timerfd_settime 311 -#define __NR_timerfd_gettime 312 +#define __NR_timerfd_settime32 311 +#define __NR_timerfd_gettime32 312 #define __NR_signalfd4 313 #define __NR_eventfd2 314 #define __NR_epoll_create1 315 diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in index 6f72d944..0102ddaf 100644 --- a/arch/sh/bits/syscall.h.in +++ b/arch/sh/bits/syscall.h.in @@ -231,8 +231,8 @@ #define __NR_remap_file_pages 257 #define __NR_set_tid_address 258 #define __NR_timer_create 259 -#define __NR_timer_settime 260 -#define __NR_timer_gettime 261 +#define __NR_timer_settime32 260 +#define __NR_timer_gettime32 261 #define __NR_timer_getoverrun 262 #define __NR_timer_delete 263 #define __NR_clock_settime32 264 @@ -294,8 +294,8 @@ #define __NR_timerfd_create 322 #define __NR_eventfd 323 #define __NR_fallocate 324 -#define __NR_timerfd_settime 325 -#define __NR_timerfd_gettime 326 +#define __NR_timerfd_settime32 325 +#define __NR_timerfd_gettime32 326 #define __NR_signalfd4 327 #define __NR_eventfd2 328 #define __NR_epoll_create1 329 diff --git a/src/internal/syscall.h b/src/internal/syscall.h index adf602ae..975a0031 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -193,6 +193,22 @@ hidden long __syscall_ret(unsigned long), #define SYS_sendfile SYS_sendfile64 #endif +#ifndef SYS_timer_settime +#define SYS_timer_settime SYS_timer_settime32 +#endif + +#ifndef SYS_timer_gettime +#define SYS_timer_gettime SYS_timer_gettime32 +#endif + +#ifndef SYS_timerfd_settime +#define SYS_timerfd_settime SYS_timerfd_settime32 +#endif + +#ifndef SYS_timerfd_gettime +#define SYS_timerfd_gettime SYS_timerfd_gettime32 +#endif + #ifndef SYS_clock_settime #define SYS_clock_settime SYS_clock_settime32 #endif -- 2.25.1