From b61e8b5a784a8bc7c9369fb00a5467cb33b98d59 Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Fri, 12 Oct 2018 12:58:23 -1000 Subject: Update dpkg --- data/dpkg/runcmd.diff | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 data/dpkg/runcmd.diff (limited to 'data/dpkg/runcmd.diff') diff --git a/data/dpkg/runcmd.diff b/data/dpkg/runcmd.diff deleted file mode 100644 index 80edf7ee6..000000000 --- a/data/dpkg/runcmd.diff +++ /dev/null @@ -1,45 +0,0 @@ ---- dpkg-1.18.10/lib/dpkg/command.c 2016-07-04 15:55:13.000000000 -1000 -+++ dpkg-1.18.10+iPhone/lib/dpkg/command.c 2018-07-27 18:00:54.000000000 -1000 -@@ -31,6 +31,8 @@ - #include - #include - -+void runcmd(struct command *cmd); -+ - /** - * Initialize a command structure. - * -@@ -178,8 +180,7 @@ - void - command_exec(struct command *cmd) - { -- execvp(cmd->filename, (char * const *)cmd->argv); -- ohshite(_("unable to execute %s (%s)"), cmd->name, cmd->filename); -+ runcmd(cmd); - } - - -@@ -230,3 +231,23 @@ - execlp(shell, shell, mode, cmd, NULL); - ohshite(_("unable to execute %s (%s)"), name, cmd); - } -+ -+void -+runcmd(struct command *cmd) -+{ -+ int i = 0; -+ char cmdstring[cmd->argv_size]; -+ char *ptr = cmdstring; // set ptr to the start of the destination buffer -+ for (i=0; iargc; i++) { -+ const char *current_arg = cmd->argv[i]; -+ char c; -+ while ( (c = *current_arg++) ) { -+ // copy each character to the destination buffer until the end of the current string -+ *ptr++ = c; -+ } -+ *ptr++ = ' '; // or whatever joining character you want -+ } -+ *ptr = '\0'; // null terminate -+ command_shell(cmdstring, cmd->name); -+ ohshite(_("unable to execute %s (%s)"), cmd->name, cmd->filename); -+} -- cgit v1.2.3