summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-12-31 13:36:33 -0400
committerJoey Hess <joey@kitenet.net>2013-12-31 13:36:33 -0400
commitcd3722aabdefd293f0200c56579616092a15e5a4 (patch)
treee200b8361396281c5ccaf9b7abbbc43ce47e78ee
parent63d717ea18eea93f89ef9654b1626bef500b6e36 (diff)
downloadmoreutils-cd3722aabdefd293f0200c56579616092a15e5a4.tar.gz
Fix ifdata, ifne, parallel to build on illumos. Thanks, Gabriele Giacone Closes: #733736
-rw-r--r--debian/changelog2
-rw-r--r--ifdata.c6
-rw-r--r--ifne.c4
-rw-r--r--parallel.c4
4 files changed, 16 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index b3eba9f..1e94875 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ moreutils (0.51) UNRELEASED; urgency=low
* use docbook-xsl for building man pages. Thanks, Peter Eisentraut
for extensive patch set!
Closes: #728831
+ * Fix ifdata, ifne, parallel to build on illumos. Thanks, Gabriele Giacone
+ Closes: #733736
-- Joey Hess <joeyh@debian.org> Mon, 04 Nov 2013 12:28:04 -0400
diff --git a/ifdata.c b/ifdata.c
index 6d7ed6f..adf9f87 100644
--- a/ifdata.c
+++ b/ifdata.c
@@ -23,6 +23,12 @@
#include <net/if.h>
#endif
+#if defined(__sun)
+ #define s6_addr16 _S6_un._S6_u8
+ #include <net/if.h>
+ #include <sys/sockio.h>
+#endif
+
#include <netinet/in.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/ifne.c b/ifne.c
index d8ecea9..e8bc100 100644
--- a/ifne.c
+++ b/ifne.c
@@ -23,6 +23,10 @@
#include <sys/wait.h>
#include <sys/types.h>
#include <string.h>
+#ifdef __sun
+#include <signal.h> /* raise() */
+#endif
+
#define streq(a, b) (!strcmp((a), (b)))
static void stdin_to_stream(char *buf, ssize_t r, FILE *outf) {
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