From nobody Wed May 8 12:25:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579263762; cv=none; d=zohomail.com; s=zohoarc; b=iM6zp7C15ya/MpjHLqhGV3+QSl+ol6cmDffV0plAg9kmt90KBKA50HPpzcHRX97OxA1BRg8Raa9wadaVePci/cDpy+4N6HYiN7UANOsYmYcRdy+9+gsqsrmjWl8AqyUxryoGyZEmEjQo8AN4BS8c0Bowk1CKctkv8HepaXKxgqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579263762; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=AmnAur6kLp4HmmEeh2Ip/wVaoA61Hivs3Ivwb7XhLZ0=; b=R6kfYAAaD9sKwr3B87vJQ0XFsTNET5v0/8Q5tAkMAqSoYgXyU0HY8Zdrw9JyE7wosHkghxsy52orjlD23qGynDNhW04wBdZ2GMGFwDRDNF0I3vZsf+iMn7jsb28m/TEqMW428USKq1jzWj94PzubBVteQpdzgInUU6wO8yzU4fM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1579263762072322.65743520101205; Fri, 17 Jan 2020 04:22:42 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-148-o8Sa1faTPhau-hImdYuw2Q-1; Fri, 17 Jan 2020 07:22:39 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 26FB71800D4F; Fri, 17 Jan 2020 12:22:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFE09675AF; Fri, 17 Jan 2020 12:22:29 +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 EF653845FB; Fri, 17 Jan 2020 12:22:24 +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 00HCMNj2004945 for ; Fri, 17 Jan 2020 07:22:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4D54381201; Fri, 17 Jan 2020 12:22:23 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id B13A181200; Fri, 17 Jan 2020 12:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579263760; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=AmnAur6kLp4HmmEeh2Ip/wVaoA61Hivs3Ivwb7XhLZ0=; b=jEUqCEfMQ4fzRLhEHq2Hp185p59IjTybkJLO27QHuCjqcxB4d9D+AFCfXMfThn/Oe1586e +ZLb1DMmzf1ZSCttDstXNehl+hvj0Eg8Gs2E4483iLWGpOh6NN+5T+EOALqBGil6pk65/7 +awg7cR3dUgjKfHMAsy5a09hyStyaaU= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] src: conditionalize / remove use of sys/ioctl.h Date: Fri, 17 Jan 2020 12:19:45 +0000 Message-Id: <20200117121945.1065481-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , 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-MC-Unique: o8Sa1faTPhau-hImdYuw2Q-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Remove many imports of sys/ioctl.h which are redundant, and conditionalize remaining usage that needs to compile on Windows platforms. The previous change to remove the "nonblocking" gnulib module indirectly caused the loss of the "ioctl" gnulib module that we did not explicitly list in bootstrap.conf despite relying on. Rather than re-introduce the "ioctl" module this patch makes it redundant. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Pavel Hrdina --- src/util/virhostcpu.c | 4 +++- src/util/virhostdev.c | 1 - src/util/virhostmem.c | 1 - src/util/virnetdev.c | 4 +++- src/util/virnetdevbridge.c | 4 +++- src/util/virnetdevip.c | 4 +++- src/util/virnetdevtap.c | 4 +++- src/util/virperf.c | 4 +++- src/util/virvsock.c | 4 +++- 9 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index f9d5db59b9..0bde532a0c 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -24,7 +24,9 @@ #include #include #include -#include +#ifndef WIN32 +# include +#endif #include =20 #if HAVE_LINUX_KVM_H diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 9b4ea30216..f8f7989206 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -22,7 +22,6 @@ #include =20 #include -#include #include #include #include diff --git a/src/util/virhostmem.c b/src/util/virhostmem.c index 9c08b9bd78..f37d1ad588 100644 --- a/src/util/virhostmem.c +++ b/src/util/virhostmem.c @@ -23,7 +23,6 @@ =20 #include #include -#include #include =20 #if defined(__FreeBSD__) || defined(__APPLE__) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index e2aad07c24..b896a7507e 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -31,7 +31,9 @@ #include "virutil.h" #include "virjson.h" =20 -#include +#ifndef WIN32 +# include +#endif #include #include =20 diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c index a37bcb4004..5bb533f1f0 100644 --- a/src/util/virnetdevbridge.c +++ b/src/util/virnetdevbridge.c @@ -27,7 +27,9 @@ #include "virlog.h" #include "virstring.h" =20 -#include +#ifndef WIN32 +# include +#endif #include #include #include diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 5696bc367e..5897c4aa76 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -33,7 +33,9 @@ # include #endif =20 -#include +#ifndef WIN32 +# include +#endif #include #include =20 diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 6a16b58d60..8656e267cb 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -33,7 +33,9 @@ =20 #include #include -#include +#ifndef WIN32 +# include +#endif #include #include #ifdef __linux__ diff --git a/src/util/virperf.c b/src/util/virperf.c index 29c388a1f2..04d27309e1 100644 --- a/src/util/virperf.c +++ b/src/util/virperf.c @@ -17,7 +17,9 @@ */ #include =20 -#include +#ifndef WIN32 +# include +#endif #if defined HAVE_SYS_SYSCALL_H # include #endif diff --git a/src/util/virvsock.c b/src/util/virvsock.c index b28287fdee..2638c5095a 100644 --- a/src/util/virvsock.c +++ b/src/util/virvsock.c @@ -17,7 +17,9 @@ =20 #include =20 -#include +#ifdef HAVE_SYS_IOCTL_H +# include +#endif =20 #if HAVE_DECL_VHOST_VSOCK_SET_GUEST_CID # include --=20 2.24.1