cmdpad: Fix compilation with musl 9414/head
authorRosen Penev <rosenp@gmail.com>
Fri, 5 Jul 2019 06:30:48 +0000 (23:30 -0700)
committerRosen Penev <rosenp@gmail.com>
Sat, 6 Jul 2019 23:47:37 +0000 (16:47 -0700)
When passing -Wimplicit-function-declaration

Also got rid of std=gnu89. It's easy to patch out.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/cmdpad/Makefile
utils/cmdpad/patches/150-header.patch [new file with mode: 0644]

index a63e9e202620d77f240265b3a16d45856b1f38ee..aa34f31fa6e238d942234f117567c5de377ffb1a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmdpad
 PKG_VERSION:=0.0.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/cmdpad
@@ -28,8 +28,6 @@ define Package/cmdpad
   URL:=http://cmdpad.sourceforge.net/index.php
 endef
 
-TARGET_CFLAGS += -std=gnu89
-
 CONFIGURE_ARGS += \
        --enable-static \
        --enable-shared
diff --git a/utils/cmdpad/patches/150-header.patch b/utils/cmdpad/patches/150-header.patch
new file mode 100644 (file)
index 0000000..2b4c3aa
--- /dev/null
@@ -0,0 +1,49 @@
+--- a/src/command.c
++++ b/src/command.c
+@@ -43,6 +43,7 @@
+ #include <linux/input.h>
+ #include <linux/ioctl.h>
++#include <sys/wait.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--- a/src/main.c
++++ b/src/main.c
+@@ -54,6 +54,7 @@
+ #include "debug.h"
+ #include "command.h"
++#include "parse.h"
+ #define DEBUGNAME         "MAIN: "
+--- a/src/parse.c
++++ b/src/parse.c
+@@ -58,7 +58,7 @@
+ extern char * pchProgramName ;
+ extern char * pchEventDevice ;
+-inline void ltrim( char * pchText)
++static void ltrim( char * pchText)
+ {
+       if( pchText) {
+               char * pchTxt = pchText ;
+@@ -67,7 +67,7 @@ inline void ltrim( char * pchText)
+       }
+ }
+-inline void rtrim( char * pchText)
++static void rtrim( char * pchText)
+ {
+       if( pchText)
+       {
+@@ -77,7 +77,7 @@ inline void rtrim( char * pchText)
+       }
+ }
+-inline void trim( char * pchText) 
++static void trim( char * pchText)
+ {
+       ltrim( pchText) ;
+       rtrim( pchText) ;