From a0554ec901561107fcd1db14498dec35120ac5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Fri, 2 Oct 2020 14:36:03 +0000 Subject: Fix build with -fno-common --- shells/ibsh/Makefile | 3 ++- shells/ibsh/files/patch-ibsh.h | 28 ++++++++++++++++++++++++++++ shells/ibsh/files/patch-main.c | 20 ++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 shells/ibsh/files/patch-ibsh.h create mode 100644 shells/ibsh/files/patch-main.c (limited to 'shells') diff --git a/shells/ibsh/Makefile b/shells/ibsh/Makefile index fc2ef1d9d315..4d4e0dd47124 100644 --- a/shells/ibsh/Makefile +++ b/shells/ibsh/Makefile @@ -3,6 +3,7 @@ PORTNAME= ibsh PORTVERSION= 0.3e +PORTREVISION= 1 CATEGORIES= shells MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} @@ -13,9 +14,9 @@ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= dos2unix gmake +MAKE_ARGS= CC="${CC}" PREFIX="${STAGEDIR}${PREFIX}" ALL_TARGET= ibsh INSTALL_TARGET= ibsh_install -MAKE_ARGS= CC="${CC}" PREFIX="${STAGEDIR}${PREFIX}" SUB_FILES= pkg-message PORTDOCS= AUTHORS BUGS CONTRIBUTORS COPYING COPYRIGHT ChangeLog \ diff --git a/shells/ibsh/files/patch-ibsh.h b/shells/ibsh/files/patch-ibsh.h new file mode 100644 index 000000000000..6b05751fdcc2 --- /dev/null +++ b/shells/ibsh/files/patch-ibsh.h @@ -0,0 +1,28 @@ +--- ibsh.h.orig 2020-10-02 14:29:21 UTC ++++ ibsh.h +@@ -88,17 +88,15 @@ typedef struct theuser { + + typedef char Strng[STRING_SIZE]; + +-theuser loggedin; /* user info */ ++extern theuser loggedin; /* user info */ + +-//static Strng commands[MAX_ITEMS]; /* permitted commands */ +-Strng commands[MAX_ITEMS]; +-Strng extensions[MAX_ITEMS]; +-/*static Strng extensions[MAX_ITEMS]; permitted extensions */ +-char real_path[STRING_SIZE]; /* absolute path */ +-char jail_path[STRING_SIZE]; /* path inside the jail */ +-char user_command[STRING_SIZE]; /* whatever the user types */ +-char filtered_command[STRING_SIZE]; /* this one will be executed */ +-int exitcode; ++extern Strng commands[MAX_ITEMS]; /* permitted commands */ ++extern Strng extensions[MAX_ITEMS]; /* permitted extensions */ ++extern char real_path[STRING_SIZE]; /* absolute path */ ++extern char jail_path[STRING_SIZE]; /* path inside the jail */ ++extern char user_command[STRING_SIZE]; /* whatever the user types */ ++extern char filtered_command[STRING_SIZE]; /* this one will be executed */ ++extern int exitcode; + extern char **environ; + + diff --git a/shells/ibsh/files/patch-main.c b/shells/ibsh/files/patch-main.c new file mode 100644 index 000000000000..a515e2915f1e --- /dev/null +++ b/shells/ibsh/files/patch-main.c @@ -0,0 +1,20 @@ +--- main.c.orig 2020-10-02 14:29:21 UTC ++++ main.c +@@ -38,6 +38,17 @@ + /* Header files */ + #include "ibsh.h" + ++theuser loggedin; /* user info */ ++ ++Strng commands[MAX_ITEMS]; /* permitted commands */ ++Strng extensions[MAX_ITEMS]; /* permitted extensions */ ++char real_path[STRING_SIZE]; /* absolute path */ ++char jail_path[STRING_SIZE]; /* path inside the jail */ ++char user_command[STRING_SIZE]; /* whatever the user types */ ++char filtered_command[STRING_SIZE]; /* this one will be executed */ ++int exitcode; ++ ++ + /* Main: */ + /* Handle arguments, read config files, start command processing. */ + /* IBSH doesnt use any command line arguments, but my text editor */ -- cgit v1.2.3