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

Greg V greg at unrelenting.technology
Sun Dec 17 19:04:42 UTC 2017


---
 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(-)

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"
-- 
2.15.1



More information about the wayland-devel mailing list