[libvirt] [PATCH] util/virprocess.c: fix MinGW build

Pavel Hrdina phrdina at redhat.com
Thu Sep 11 13:16:44 UTC 2014


On 09/11/2014 03:13 PM, Peter Krempa wrote:
> On 09/11/14 15:12, Pavel Hrdina wrote:
>> On 09/11/2014 03:03 PM, Peter Krempa wrote:
>>> Subject doesn't describe what caused the build to fail.
>>>
>>> On 09/11/14 14:57, Pavel Hrdina wrote:
>>>
>>> Neither the rest of the commit message.
>>
>> The build failed because of missing "sys/syscall.h".
>>
>> Will update the commit message, thanks.
>>
>>>
>>>> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
>>>> ---
>>>>    src/util/virprocess.c | 12 +++++++++++-
>>>>    1 file changed, 11 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/src/util/virprocess.c b/src/util/virprocess.c
>>>> index 15d8309..3dae1bd 100644
>>>> --- a/src/util/virprocess.c
>>>> +++ b/src/util/virprocess.c
>>>> @@ -28,7 +28,6 @@
>>>>    #include <stdlib.h>
>>>>    #include <sys/wait.h>
>>>>    #include <unistd.h>
>>>> -#include <sys/syscall.h>
>>>>    #if HAVE_SETRLIMIT
>>>>    # include <sys/time.h>
>>>>    # include <sys/resource.h>
>>>> @@ -78,10 +77,21 @@ VIR_LOG_INIT("util.process");
>>>>    #endif
>>>>
>>>>    #ifndef HAVE_SETNS
>>>
>>> Is this set on the windows build? That's strange. Shouldn't we fix the
>>> make system to avoid it?
>>>
>>
>> This is a workaround if the HAVE_SETNS is not defined because old glibc
>> may not have a wrapper for this syscall. And it obviously isn't defined
>> for windows.
>
> Aaah, right. I overlooked the "n" in ifndef ...
>
> ACK if you add the commit message then.
>
>
> Peter
>

Pushed, thanks.

Pavel




More information about the libvir-list mailing list