]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: fix mingw build
authorEric Blake <eblake@redhat.com>
Mon, 17 Aug 2015 23:03:40 +0000 (16:03 -0700)
committerCole Robinson <crobinso@redhat.com>
Tue, 22 Sep 2015 00:18:00 +0000 (20:18 -0400)
commit9e5c5fbdc66b6c0a4b342c270587cf79bac7be6e
tree214ab5ebbb1d35587f013ed539df5a2da6d9bf5e
parent2eef8aa8ecff1cd96d9786138bd307b59f7b7138
build: fix mingw build

Ever since commit e44b0269, 64-bit mingw compilation fails with:

../../src/util/virprocess.c: In function 'virProcessGetPids':
../../src/util/virprocess.c:628:50: error: passing argument 4 of 'virStrToLong_i' from incompatible pointer type [-Werror=incompatible-pointer-types]
         if (virStrToLong_i(ent->d_name, NULL, 10, &tmp_pid) < 0)
                                                  ^
In file included from ../../src/util/virprocess.c:59:0:
../../src/util/virstring.h:53:5: note: expected 'int *' but argument is of type 'pid_t * {aka long long int *}'
 int virStrToLong_i(char const *s,
     ^
cc1: all warnings being treated as errors

Although mingw won't be using this function, it does compile the
file, and the fix is relatively simple.

* src/util/virprocess.c (virProcessGetPids): Don't assume pid_t
fits in int.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 0a617b53d4e03658b3562cc04adff54eaf2eb925)
src/util/virprocess.c