mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-15 19:35:53 +03:00
build: fix getcwd portability problems
* bootstrap.conf (gnulib_modules): Add getcwd-lgpl. * tests/commandtest.c (checkoutput): Drop unused cwd. * tests/commandhelper.c (main): Let getcwd malloc. * tests/testutils.c (virTestMain): Likewise. * tools/virsh.c (cmdPwd): Likewise. (virshCmds): Expose cmdPwd and cmdCd on mingw.
This commit is contained in:
@@ -49,15 +49,11 @@ mymain(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
static int checkoutput(const char *testname)
|
||||
{
|
||||
int ret = -1;
|
||||
char cwd[1024];
|
||||
char *expectname = NULL;
|
||||
char *expectlog = NULL;
|
||||
char *actualname = NULL;
|
||||
char *actuallog = NULL;
|
||||
|
||||
if (!getcwd(cwd, sizeof(cwd)))
|
||||
return -1;
|
||||
|
||||
if (virAsprintf(&expectname, "%s/commanddata/%s.log", abs_srcdir,
|
||||
testname) < 0)
|
||||
goto cleanup;
|
||||
|
Reference in New Issue
Block a user