package_script.c: fix runtime with tcc

Making `shells` a global declaration does not seem to make tcc happy, so make this a local variable in `xbps_pkg_exec_buffer` instead.
This commit is contained in:
Juan RP 2019-10-27 09:35:55 +01:00
parent bc59d0b407
commit b9b6f43300

View File

@ -31,12 +31,6 @@
#include "xbps_api_impl.h"
const char *shells[] = {
"/bin/sh",
"/bin/dash",
"/bin/bash",
NULL
};
int
xbps_pkg_exec_buffer(struct xbps_handle *xhp,
@ -49,6 +43,12 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
int i;
ssize_t ret;
const char *tmpdir, *version;
const char *shells[] = {
"/bin/sh",
"/bin/dash",
"/bin/bash",
NULL
};
char *pkgname, *fpath;
int fd, rv;