[weston,8/8] Fix various includes for portability

Submitted by Greg V on Dec. 17, 2017, 7:04 p.m.

Details

Message ID 20171217190442.29265-9-greg@unrelenting.technology
State New
Headers show
Series "Portability patches" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Greg V Dec. 17, 2017, 7:04 p.m.
---
 libweston/input.c              | 2 +-
 libweston/pixel-formats.c      | 4 ++++
 tests/ivi_layout-test-plugin.c | 1 +
 tests/weston-test.c            | 1 +
 4 files changed, 7 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/libweston/input.c b/libweston/input.c
index 94a3423a..a102732c 100644
--- a/libweston/input.c
+++ b/libweston/input.c
@@ -32,7 +32,7 @@ 
 #include <sys/mman.h>
 #include <assert.h>
 #include <unistd.h>
-#include <values.h>
+#include <float.h>
 #include <fcntl.h>
 #include <limits.h>
 
diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c
index df84a9f3..d49af7dd 100644
--- a/libweston/pixel-formats.c
+++ b/libweston/pixel-formats.c
@@ -25,7 +25,11 @@ 
 
 #include "config.h"
 
+#ifdef __linux__
 #include <endian.h>
+#else
+#include <sys/endian.h>
+#endif
 #include <inttypes.h>
 #include <stdbool.h>
 #include <unistd.h>
diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
index 19eab81a..6106521f 100644
--- a/tests/ivi_layout-test-plugin.c
+++ b/tests/ivi_layout-test-plugin.c
@@ -32,6 +32,7 @@ 
 #include <signal.h>
 #include <string.h>
 #include <assert.h>
+#include <sys/wait.h>
 
 #include "compositor.h"
 #include "compositor/weston.h"
diff --git a/tests/weston-test.c b/tests/weston-test.c
index 6e7beeb7..3015955f 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -31,6 +31,7 @@ 
 #include <signal.h>
 #include <unistd.h>
 #include <string.h>
+#include <sys/wait.h>
 
 #include "compositor.h"
 #include "compositor/weston.h"