fbterm: fix musl compile (missing string.h include)
PATCH 1/1 fbterm: fix musl compile (missing string.h include)
Fixes [1]:
mouse.cpp: In function 's32 open_gpm(Gpm_Connect*)':
mouse.cpp:58:37: error: 'memset' was not declared in this scope
memset((s8 *)&addr, 0, sizeof(addr));
^
mouse.cpp:60:64: error: 'strncpy' was not declared in this scope
strncpy(addr.sun_path, GPM_NODE_CTL, sizeof(addr.sun_path) - 1);in case BR2_PACKAGE_GPM is defined.
Add proper gpm dependency and configure option too.
[1] http://autobuild.buildroot.net/results/a60/a602d61e68f662217ad868de79711a8ea892a3a9
--- .../fbterm/0002-mouse.cpp-fix-musl-compile.patch | 30 ++++++++++++++++++++++ package/fbterm/fbterm.mk | 7 +++++ 2 files changed, 37 insertions(+) create mode 100644 package/fbterm/0002-mouse.cpp-fix-musl-compile.patch
package/fbterm/0002-mouse.cpp-fix-musl-compile.patch new file +30 -0
@@ -0,0 +1,30 @@ +From a34dba99aff2994269ee347da67feb7ede9b1a67 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +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 <[email protected]> +--- + 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 +
package/fbterm/fbterm.mk +7 -0
@@ -16,4 +16,11 @@ ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) FBTERM_CONF_ENV += LIBS='-lpthread' endif +ifeq ($(BR2_PACKAGE_GPM),y) +FBTERM_DEPENDENCIES += gpm +FBTERM_CONF_OPTS += --enable-gpm +else +FBTERM_CONF_OPTS += --disable-gpm +endif + $(eval $(autotools-package))
Signature · 1 line
2.1.4
PATCH 1/1 fbterm: fix musl compile (missing string.h include)
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
Fixes [1]:
mouse.cpp: In function 's32open_gpm(Gpm_Connect*)':
mouse.cpp:58:37: error: 'memset' was not declared in this scopememset((s8 *)&addr, 0, sizeof(addr)); ^ mouse.cpp:60:64: error: 'strncpy' was not declared in this scope strncpy(addr.sun_path, GPM_NODE_CTL, sizeof(addr.sun_path) - 1);
Quoted 7 lines
in case
BR2_PACKAGE_GPMis defined.Add proper gpm dependency and configure option too.
[1] http://autobuild.buildroot.net/results/a60/a602d61e68f662217ad868de79711a8ea892a3a9
Signed-off-by Peter Seiderer <[email protected]>
Committed, thanks. Don't forget to send the patch upstream.
Signature · 1 line
Bye, Peter Korsgaard