提交 2df085bf 编写于 作者: D Daniel P. Berrangé

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: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 f018fbac
......@@ -31,6 +31,9 @@
#ifndef WIN32
/* Some UNIX lack it in headers & it doesn't hurt to redeclare */
extern char **environ;
# define VIR_FROM_THIS VIR_FROM_NONE
static int envsort(const void *a, const void *b)
......
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册