]> xenbits.xensource.com Git - libvirt.git/commit
tests: virpcimock: Always declare __open_2
authorPeter Krempa <pkrempa@redhat.com>
Fri, 16 Aug 2019 07:41:14 +0000 (09:41 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 16 Aug 2019 08:00:16 +0000 (10:00 +0200)
commit52dad8c9b0d3a008f21c082c7fd3343fdb66fffe
tree96e001b1ec672ccdcf8923c00f63b58ac9187001
parent3b7c5ab983f4655ae02b8af4517d89839530ee5f
tests: virpcimock: Always declare __open_2

In some cases e.g. with clang on fedora 30 __open2 isn't even declared
which results in the following build error:

/home/pipo/libvirt/tests/virpcimock.c:939:1: error: no previous prototype for function
      '__open_2' [-Werror,-Wmissing-prototypes]
__open_2(const char *path, int flags)

Add a separate declaration to appease the compiler.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
tests/virpcimock.c