From nobody Sat Feb 7 08:23:18 2026 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 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 1580217311886807.8719690079131; Tue, 28 Jan 2020 05:15:11 -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-201-d5wJfYKXNO--Kf6qCx9FgA-1; Tue, 28 Jan 2020 08:13:23 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 77C0118A6ED5; Tue, 28 Jan 2020 13:13:16 +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 47F6A5C553; Tue, 28 Jan 2020 13:13:16 +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 EA37085E41; Tue, 28 Jan 2020 13:13:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00SDDEWc019420 for ; Tue, 28 Jan 2020 08:13:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2CF601084192; Tue, 28 Jan 2020 13:13:14 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (unknown [10.33.8.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A1281036D1A; Tue, 28 Jan 2020 13:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580217309; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sbjqDpjVCefIZO91TBh1eEZb/Ku5pa8bUtJqKjbAnLI=; b=JgdSI2w0xyhyblQ9tuAyjUn+5gOh6B5CLMpOgzFwRMvOYkKV6kr9MFTb16uoD4+MtvC8/h ffn7Hh5duG0XsWMM1uVhYqXh9zjtv1fyjwFIXIncEEfK3oORQcdyh62XNAs0yumPqu4r76 Zx2gtCRqXkTam6zozvg1twQFm7GaVOY= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2 27/56] src: conditionalize use of O_BINARY Date: Tue, 28 Jan 2020 13:11:08 +0000 Message-Id: <20200128131137.1762449-28-berrange@redhat.com> In-Reply-To: <20200128131137.1762449-1-berrange@redhat.com> References: <20200128131137.1762449-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.16 X-MC-Unique: d5wJfYKXNO--Kf6qCx9FgA-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" The O_BINARY flag is not defined on all platforms so we must conditionalize its use once we remove GNULIB. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Pavel Hrdina --- src/util/virfdstream.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index a903107afb..58b77aa6fa 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -1243,7 +1243,10 @@ virFDStreamOpenFileInternal(virStreamPtr st, VIR_DEBUG("st=3D%p path=3D%s oflags=3D0x%x offset=3D%llu length=3D%llu= mode=3D0%o", st, path, oflags, offset, length, mode); =20 - oflags |=3D O_NOCTTY | O_BINARY; + oflags |=3D O_NOCTTY; +#ifdef O_BINARY + oflags |=3D O_BINARY; +#endif =20 if (oflags & O_CREAT) fd =3D open(path, oflags, mode); --=20 2.24.1