[libvirt] [PATCH] testutils.c: unsetenv() iff platform has it

Michal Privoznik mprivozn at redhat.com
Thu May 26 16:02:57 UTC 2016


On 26.05.2016 17:54, Eric Blake wrote:
> On 05/26/2016 09:40 AM, Michal Privoznik wrote:
>> I've encountered the following problem (introduced by 6326865e):
>>
>> ../../tests/testutils.c: In function 'virtTestRun':
>> ../../tests/testutils.c:289:5: error: implicit declaration of function 'unsetenv' [-Werror=implicit-function-declaration]
>>      unsetenv("VIR_TEST_MOCK_TESTNAME");
>>
>> Apparently, mingw does not have unsetenv(). Therefore we should
>> call it iff we are sure platform we are building for has it.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>
>> This is a tentative patch. Ideally, we would use gnulib's
>> implementation (like we do for setenv()), but there are some
>> licensing problems right now [1]. If they are resolved before our
>> release, we can just pick new gnulib. If, however, they are not,
>> we can just push this patch.
> 
> Conditional ACK; this is a nice fallback if the gnulib stuff doesn't
> happen fast enough for us, but is indeed something we'd revert once
> gnulib is ready.

Correct. But if gnulib's updated on time, we will need a different patch
(updating boostrap.conf). Conditional thanks :)

Michal




More information about the libvir-list mailing list