mirror of
git://git.musl-libc.org/musl
synced 2024-12-16 19:55:38 +00:00
fix and cleanup suseconds_t/timeval stuff (broken on 64-bit)
trash in the upper 32 bits was making the kernel sleep forever in select on 64-bit systems.
This commit is contained in:
parent
91e836fda7
commit
cac7d837cc
@ -55,7 +55,7 @@ TYPEDEF unsigned long uintptr_t;
|
||||
|
||||
TYPEDEF long time_t;
|
||||
TYPEDEF long suseconds_t;
|
||||
STRUCT timeval { time_t tv_sec; int tv_usec; };
|
||||
STRUCT timeval { time_t tv_sec; long tv_usec; };
|
||||
STRUCT timespec { time_t tv_sec; long tv_nsec; };
|
||||
|
||||
TYPEDEF int pid_t;
|
||||
|
@ -6,6 +6,7 @@ extern "C" {
|
||||
|
||||
#define __NEED_size_t
|
||||
#define __NEED_time_t
|
||||
#define __NEED_suseconds_t
|
||||
#define __NEED_struct_timeval
|
||||
#define __NEED_struct_timespec
|
||||
#define __NEED_sigset_t
|
||||
|
@ -4,17 +4,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* All symbols from select.h except pselect are required anyway... */
|
||||
#include <sys/select.h>
|
||||
|
||||
#define __NEED_time_t
|
||||
#define __NEED_suseconds_t
|
||||
#define __NEED_struct_timeval
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
|
||||
|
||||
int gettimeofday (struct timeval *, void *);
|
||||
|
||||
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
|
||||
|
Loading…
Reference in New Issue
Block a user