summaryrefslogtreecommitdiff
path: root/tests/commandtest.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-01-07 16:16:19 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2020-01-17 09:59:08 +0000
commit2df085bf2493b296de9448ee43be11133e2e3d69 (patch)
treee793f63e63ccbc898ef32bf11938e1090a231958 /tests/commandtest.c
parentf018fbac78ae5b0d9928ee9a4724b2f17c38efef (diff)
downloadlibvirt-2df085bf2493b296de9448ee43be11133e2e3d69.tar.gz
tests: always declare environ
Some UNIX platforms don't declare 'environ' in their header files. We can unconditionally declare it ourselves to avoid this problem. There is no need to do this in the aa-helper code since that is Linux only code. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/commandtest.c')
-rw-r--r--tests/commandtest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/commandtest.c b/tests/commandtest.c
index 5df1aa4221..cc8676811e 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -58,6 +58,9 @@ main(void)
#else
+/* Some UNIX lack it in headers & it doesn't hurt to redeclare */
+extern char **environ;
+
static int checkoutput(const char *testname,
char *prefix)
{