Jelajahi Sumber

_exit.c: include the proper headers

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 13 tahun lalu
induk
melakukan
ab5add209a
1 mengubah file dengan 3 tambahan dan 11 penghapusan
  1. 3 11
      libc/sysdeps/linux/common/_exit.c

+ 3 - 11
libc/sysdeps/linux/common/_exit.c

@@ -7,25 +7,17 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#include <features.h>
-#include <errno.h>
 #include <unistd.h>
-#include <sys/types.h>
+#include <stdlib.h>
 #include <sys/syscall.h>
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-#include <sysdep.h>
-#endif
-
 
-void attribute_noreturn _exit(int status)
+void _exit(int status)
 {
 	/* The loop is added only to keep gcc happy. */
 	while(1)
 	{
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-# ifdef __NR_exit_group
+#if defined __NR_exit_group && defined __UCLIBC_HAS_THREADS_NATIVE__
 		INLINE_SYSCALL(exit_group, 1, status);
-# endif
 #endif
 		INLINE_SYSCALL(exit, 1, status);
 	}