summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmael Luceno2019-05-21 20:29:39 +0200
committerIsmael Luceno2019-05-21 22:23:44 +0200
commit3f6e93834794d186f0b681f4bb6191068c40caba (patch)
tree36d65d3a5046a94b6f0c9f62cd53769d50222c16
parent770c6b3a46c62e7d2bdb894c394f1ac7fc0223b7 (diff)
fbterm: Fix build against musl
-rw-r--r--display/fbterm/HISTORY3
-rwxr-xr-xdisplay/fbterm/PRE_BUILD4
-rw-r--r--display/fbterm/fix-musl-compile.patch99
3 files changed, 104 insertions, 2 deletions
diff --git a/display/fbterm/HISTORY b/display/fbterm/HISTORY
index c233600e0d..5359dd14f9 100644
--- a/display/fbterm/HISTORY
+++ b/display/fbterm/HISTORY
@@ -1,3 +1,6 @@
+2019-05-21 Ismael Luceno <ismael@sourcemage.org>
+ * PRE_BUILD, fix-musl-compile.patch: Fixed build against musl
+
2018-03-30 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
* DETAILS: update WEB_SITE
* PRE_BUILD, 0001-fix-compilation-with-gcc-7.patch: fix build with gcc 7
diff --git a/display/fbterm/PRE_BUILD b/display/fbterm/PRE_BUILD
index b434f3a176..11fe7e6b6b 100755
--- a/display/fbterm/PRE_BUILD
+++ b/display/fbterm/PRE_BUILD
@@ -1,5 +1,5 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
-patch -p1 < "$SPELL_DIRECTORY/0001-fix-compilation-with-gcc-7.patch"
-
+patch -fp1 -i "$SPELL_DIRECTORY/fix-musl-compile.patch" &&
+patch -fp1 -i "$SPELL_DIRECTORY/0001-fix-compilation-with-gcc-7.patch"
diff --git a/display/fbterm/fix-musl-compile.patch b/display/fbterm/fix-musl-compile.patch
new file mode 100644
index 0000000000..a79bc13fce
--- /dev/null
+++ b/display/fbterm/fix-musl-compile.patch
@@ -0,0 +1,99 @@
+From 1072d60c6c8f1f51feb740527a8a056bfead9318 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 8 Oct 2015 19:53:47 +0200
+Subject: [PATCH] fbio.cpp, improxy.cpp, fbterm.cpp: fix musl compile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+- add missing include, fixes:
+
+ fbio.cpp:33:8: error: ‘fd_set’ does not name a type
+ static fd_set fds;
+
+ improxy.cpp:439:3: error: ‘fd_set’ was not declared in this scope
+
+- add missing WAIT_ANY define, fixes:
+
+ fbterm.cpp: In member function ‘void FbTerm::processSignal(u32)’:
+ fbterm.cpp:212:22: error: ‘WAIT_ANY’ was not declared in this scope
+ s32 pid = waitpid(WAIT_ANY, 0, WNOHANG);
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/fbio.cpp | 1 +
+ src/fbterm.cpp | 4 ++++
+ src/improxy.cpp | 1 +
+ 3 files changed, 6 insertions(+)
+
+diff --git a/src/fbio.cpp b/src/fbio.cpp
+index e5afc44..88c632c 100644
+--- a/src/fbio.cpp
++++ b/src/fbio.cpp
+@@ -30,6 +30,7 @@
+ #define NR_EPOLL_FDS 10
+ s32 epollFd;
+ #else
++#include <sys/select.h>
+ static fd_set fds;
+ static u32 maxfd = 0;
+ #endif
+diff --git a/src/fbterm.cpp b/src/fbterm.cpp
+index 38d4014..60288e4 100644
+--- a/src/fbterm.cpp
++++ b/src/fbterm.cpp
+@@ -37,6 +37,10 @@
+ #include "input_key.h"
+ #include "mouse.h"
+
++#ifndef WAIT_ANY
++#define WAIT_ANY (-1)
++#endif
++
+ #ifdef HAVE_SIGNALFD
+ // <sys/signalfd.h> offered by some systems has bug with g++
+ #include "signalfd.h"
+diff --git a/src/improxy.cpp b/src/improxy.cpp
+index 3d03e66..4e046d2 100644
+--- a/src/improxy.cpp
++++ b/src/improxy.cpp
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <errno.h>
++#include <sys/select.h>
+ #include <sys/socket.h>
+ #include "improxy.h"
+ #include "immessage.h"
+--
+2.1.4
+
+From a34dba99aff2994269ee347da67feb7ede9b1a67 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 18 Feb 2016 22:32:38 +0100
+Subject: [PATCH] mouse.cpp: fix musl compile
+
+Add missing include, fixes:
+
+ mouse.cpp:58:37: error: 'memset' was not declared in this scope
+ mouse.cpp:60:64: error: 'strncpy' was not declared in this scope
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/mouse.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mouse.cpp b/src/mouse.cpp
+index 0435dd9..f173137 100644
+--- a/src/mouse.cpp
++++ b/src/mouse.cpp
+@@ -27,6 +27,7 @@ DEFINE_INSTANCE(Mouse)
+ #include <stddef.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <gpm.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+--
+2.1.4