mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
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>
This commit is contained in:
parent
3b7c5ab983
commit
52dad8c9b0
@ -935,6 +935,11 @@ open(const char *path, int flags, ...)
|
||||
}
|
||||
|
||||
|
||||
/* in some cases this function may not be present in headers, so we need
|
||||
* a declaration to silence the complier */
|
||||
int
|
||||
__open_2(const char *path, int flags);
|
||||
|
||||
int
|
||||
__open_2(const char *path, int flags)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user