summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-10 17:50:11 +0000
committerJim Meyering <jim@meyering.net>2003-08-10 17:50:11 +0000
commitcc664579f8d12c6c87948eca0ca0dd6824e35097 (patch)
tree7ba85be84b3b1bf998c5146150dc424c4ce00140 /src
parent8dc1a94ca6adaf8a34bfde74717512a701ba9543 (diff)
downloadcoreutils-cc664579f8d12c6c87948eca0ca0dd6824e35097.tar.xz
[!NICE_PRIORITY]: Include <sys/resource.h> after
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.
Diffstat (limited to 'src')
-rw-r--r--src/nice.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nice.c b/src/nice.c
index 842ac484b..487fb5510 100644
--- a/src/nice.c
+++ b/src/nice.c
@@ -24,12 +24,15 @@
#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"