diff options
Diffstat (limited to 'libc/unistd/sleep.c')
-rw-r--r-- | libc/unistd/sleep.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/unistd/sleep.c b/libc/unistd/sleep.c index 01a9b641b..3d3d516ab 100644 --- a/libc/unistd/sleep.c +++ b/libc/unistd/sleep.c @@ -18,6 +18,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define sigaction __sigaction +#define nanosleep __nanosleep + #include <errno.h> #include <time.h> #include <signal.h> @@ -27,7 +30,7 @@ /* This is a quick and dirty, but not 100% compliant with * the stupid SysV SIGCHLD vs. SIG_IGN behaviour. It is * fine unless you are messing with SIGCHLD... */ -unsigned int sleep (unsigned int sec) +unsigned int attribute_hidden __sleep (unsigned int sec) { unsigned int res; struct timespec ts = { .tv_sec = (long int) seconds, .tv_nsec = 0 }; @@ -41,7 +44,7 @@ unsigned int sleep (unsigned int sec) /* We are going to use the `nanosleep' syscall of the kernel. But the kernel does not implement the sstupid SysV SIGCHLD vs. SIG_IGN behaviour for this syscall. Therefore we have to emulate it here. */ -unsigned int sleep (unsigned int seconds) +unsigned int attribute_hidden __sleep (unsigned int seconds) { struct timespec ts = { .tv_sec = (long int) seconds, .tv_nsec = 0 }; sigset_t set, oset; @@ -105,3 +108,4 @@ unsigned int sleep (unsigned int seconds) return result; } #endif +strong_alias(__sleep,sleep) |