1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

Fix build with -fno-common

This commit is contained in:
Stefan Eßer 2020-10-02 14:36:03 +00:00
parent c7d73fdded
commit a0554ec901
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=551216
3 changed files with 50 additions and 1 deletions

View File

@ -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 \

View File

@ -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;

View File

@ -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 */