]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
[!NICE_PRIORITY]: Include <sys/resource.h> after
authorJim Meyering <jim@meyering.net>
Sun, 10 Aug 2003 17:50:11 +0000 (17:50 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 10 Aug 2003 17:50:11 +0000 (17:50 +0000)
system.h so the types from time.h and sys/time.h are available.
It appears that this is necessary for OpenBSD, NetBSD, and
Darwin 6.5 (MacOS 10.2.5).  Reported by Nelson Beebe.

src/nice.c

index 842ac484b7ed3983b69f480953970619854c73fc..487fb5510d0fa059aa5b0df04101e0663b47f5b2 100644 (file)
 
 #include <getopt.h>
 #include <sys/types.h>
+
+#include "system.h"
+
 #ifndef NICE_PRIORITY
-# include <time.h>
+/* Include this after "system.h" so we're sure to have definitions
+   (from time.h or sys/time.h) required for e.g. the ru_utime member.  */
 # include <sys/resource.h>
 #endif
 
-#include "system.h"
 #include "error.h"
 #include "long-options.h"
 #include "posixver.h"