mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
build: virrandommock.c not needed on mingw
We can't mock tests on Mingw, which lacks dlopen() and friends; follow the paradigms used in other mock files of conditionally compiling nothing when not building for Linux. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
ca10bb040f
commit
fc9cc507b8
@ -20,11 +20,13 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "virrandom.h"
|
||||
#include "virmock.h"
|
||||
#ifndef WIN32
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
# include "internal.h"
|
||||
# include "virrandom.h"
|
||||
# include "virmock.h"
|
||||
|
||||
# define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
int
|
||||
virRandomBytes(unsigned char *buf,
|
||||
@ -39,9 +41,9 @@ virRandomBytes(unsigned char *buf,
|
||||
}
|
||||
|
||||
|
||||
#ifdef WITH_GNUTLS
|
||||
# include <stdio.h>
|
||||
# include <gnutls/gnutls.h>
|
||||
# ifdef WITH_GNUTLS
|
||||
# include <stdio.h>
|
||||
# include <gnutls/gnutls.h>
|
||||
|
||||
static int (*real_gnutls_dh_params_generate2)(gnutls_dh_params_t dparams,
|
||||
unsigned int bits);
|
||||
@ -76,4 +78,7 @@ gnutls_dh_params_generate2(gnutls_dh_params_t dparams,
|
||||
|
||||
return gnutls_dh_params_cpy(dparams, params_cache);
|
||||
}
|
||||
# endif
|
||||
#else /* WIN32 */
|
||||
/* Can't mock on WIN32 */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user