Selaa lähdekoodia

utime.c,utimes.c: include headers only when needed

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 14 vuotta sitten
vanhempi
commit
8f1ba5cd4f
2 muutettua tiedostoa jossa 6 lisäystä ja 8 poistoa
  1. 3 4
      libc/sysdeps/linux/common/utime.c
  2. 3 4
      libc/sysdeps/linux/common/utimes.c

+ 3 - 4
libc/sysdeps/linux/common/utime.c

@@ -10,13 +10,12 @@
 #include <sys/syscall.h>
 #include <utime.h>
 
-
 #ifdef __NR_utime
 _syscall2(int, utime, const char *, file, const struct utimbuf *, times)
 #else
-#include <stdlib.h>
-#include <sys/time.h>
-
+# define __need_NULL
+# include <stddef.h>
+# include <sys/time.h>
 
 int utime(const char *file, const struct utimbuf *times)
 {

+ 3 - 4
libc/sysdeps/linux/common/utimes.c

@@ -8,15 +8,14 @@
  */
 
 #include <sys/syscall.h>
-#include <utime.h>
 #include <sys/time.h>
 
-
 #ifdef __NR_utimes
 _syscall2(int, utimes, const char *, file, const struct timeval *, tvp)
 #else
-#include <stdlib.h>
-
+# define __need_NULL
+# include <stddef.h>
+# include <utime.h>
 
 int utimes(const char *file, const struct timeval tvp[2])
 {