summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-12-31 11:57:18 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-12-31 11:57:18 +0400
commite08b807779c6816e2c64a565a31d311f47c3c2af (patch)
treecf14bf7d8bb9b8bfe8a1d22ac2f9138d4ffae5ab
parent13a20e9718bdab75f526196b1e1c3352d143370a (diff)
downloadmoreutils-e08b807779c6816e2c64a565a31d311f47c3c2af.tar.gz
include <sys/loadavg.h> for getloadavg() in parallel.c on illumos/solaris
-rw-r--r--debian/changelog2
-rw-r--r--parallel.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 8c5b796..1ae8914 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ moreutils (0.51+dyson1) UNRELEASED; urgency=low
[ Igor Pashev ]
* Fixed ifdata for illumos/Solaris. Thanks to Gabriele Giacone
* include <signal.h> for raise() in ifne.c
+ * include <sys/loadavg.h> for getloadavg() in parallel.c on
+ illumos/solaris
-- Igor Pashev <pashev.igor@gmail.com> Tue, 31 Dec 2013 11:38:59 +0400
diff --git a/parallel.c b/parallel.c
index 1bd796b..b9d7ab2 100644
--- a/parallel.c
+++ b/parallel.c
@@ -32,6 +32,10 @@
#include <sys/wait.h>
#include <unistd.h>
+#ifdef __sun
+# include <sys/loadavg.h> /* getloadavg() */
+#endif
+
#if !defined(WEXITED)
#define WEXITED 0
#endif