From nobody Sat May 4 18:50:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 14944996064443.245511689154796; Thu, 11 May 2017 03:46:46 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 449E49D405; Thu, 11 May 2017 10:46:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9EF8888B34; Thu, 11 May 2017 10:46:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 78A17180BAF1; Thu, 11 May 2017 10:46:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4BAk6YM000800 for ; Thu, 11 May 2017 06:46:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5656E8D540; Thu, 11 May 2017 10:46:06 +0000 (UTC) Received: from dhcp-17-113.lcy.redhat.com (unknown [10.42.17.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4ADD8D546; Thu, 11 May 2017 10:46:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 449E49D405 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 449E49D405 From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Thu, 11 May 2017 11:46:01 +0100 Message-Id: <20170511104601.27411-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: stub out virfilewrapper.c on Win32 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 11 May 2017 10:46:45 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The Win32 platform can not do link time overrides in the same way that we can on POSIX / ELF based platforms, so we cannot build the virfilewrapper.c code reliably. Just stub it out on Win32 so it is a no-op. Tests that use this file are already written to skip on Win32. Signed-off-by: Daniel P. Berrange --- Pushed as a mingw build fix tests/virfilewrapper.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index 5ea70b3..bf2fa69 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -18,15 +18,17 @@ =20 #include =20 -#include -#include -#include +#ifndef WIN32 =20 -#include "viralloc.h" -#include "virfile.h" -#include "virfilewrapper.h" -#include "virmock.h" -#include "virstring.h" +# include +# include +# include + +# include "viralloc.h" +# include "virfile.h" +# include "virfilewrapper.h" +# include "virmock.h" +# include "virstring.h" =20 =20 /* Mapping for prefix overrides */ @@ -139,7 +141,7 @@ virFileWrapperOverridePrefix(const char *path) } =20 =20 -#define PATH_OVERRIDE(newpath, path) \ +# define PATH_OVERRIDE(newpath, path) \ do { \ init_syms(); \ \ @@ -177,7 +179,7 @@ int access(const char *path, int mode) return ret; } =20 -#ifdef HAVE___LXSTAT +# ifdef HAVE___LXSTAT int __lxstat(int ver, const char *path, struct stat *sb) { int ret =3D -1; @@ -191,7 +193,7 @@ int __lxstat(int ver, const char *path, struct stat *sb) =20 return ret; } -#endif /* HAVE___LXSTAT */ +# endif /* HAVE___LXSTAT */ =20 int lstat(const char *path, struct stat *sb) { @@ -207,7 +209,7 @@ int lstat(const char *path, struct stat *sb) return ret; } =20 -#ifdef HAVE___XSTAT +# ifdef HAVE___XSTAT int __xstat(int ver, const char *path, struct stat *sb) { int ret =3D -1; @@ -221,7 +223,7 @@ int __xstat(int ver, const char *path, struct stat *sb) =20 return ret; } -#endif /* HAVE___XSTAT */ +# endif /* HAVE___XSTAT */ =20 int stat(const char *path, struct stat *sb) { @@ -278,3 +280,4 @@ DIR *opendir(const char *path) =20 return ret; } +#endif --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list