From nobody Wed May 8 01:54:01 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1555552408; cv=none; d=zoho.com; s=zohoarc; b=LU59UToP6UUOZgk8KX3dV3OrO9CkApqQ58/0a3lRUsp1erMa1+JsvgE5wvK/ImjrfRDDHtYNAjP6xBxrvq1ufy9Y+F+sigVkge+/FU3DFWRQL3c37qyFw7rn1GR0+n2vz1qIC4z6Dg5m9QN3EPT0Za4l4ZPYCebO2O7PebSs0XQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555552408; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=+0byJMix5iS8Oo57/9TSvSfjF/sM3OVWf0rSyqiHuos=; b=PFvX2HRDLdBFtOoj81JRwLKYZ0VZIwa22vM0u2yNNEulclFFqXmcnNazp1zKJTkGMcGlYqOGh4nPqM/wJDfS5PkxIIWkDBdsgdz5THp5apm/w8fy3vTlFF6AsVTTFDvEyckbml3lTaoN5MagcckuPW2aLOW2WTGHBZOAgRpUuwI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155555240859080.35322332674798; Wed, 17 Apr 2019 18:53:28 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hGwDn-0001tF-0t; Thu, 18 Apr 2019 01:52:15 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hGwDm-0001tA-3b for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 01:52:14 +0000 Received: from mail-qt1-x843.google.com (unknown [2607:f8b0:4864:20::843]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 95723b1e-617c-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 01:52:12 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id f13so192132qto.6 for ; Wed, 17 Apr 2019 18:52:12 -0700 (PDT) Received: from localhost.localdomain (c-73-129-199-244.hsd1.md.comcast.net. [73.129.199.244]) by smtp.gmail.com with ESMTPSA id j93sm323892qtd.82.2019.04.17.18.52.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 18:52:11 -0700 (PDT) X-Inumbo-ID: 95723b1e-617c-11e9-92d7-bc764e045a96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ivI26akOyzNjxb/QZJE9El9S7eMR9ZQApKzypjYBa4Y=; b=Psn37fPswbl51YS7/4HLVAg/EzduT3uwpp/vrBcGa2RciSuyhorIhFgqKvmJuL2m1u u2vuWJzhP5xsXBXIvn10CfvEdVDJj5qzPMzl8GRIoILt/mRFILmEDK7e8P5euPZe3whD ahVxbfQZuUp6b6K4G2/potIO43rHN7IYyyG4KOPBHpkWfECI4vMpt1evixZQHp7wEz/T lTCCbq8ey2npLAjlPNWhXV+cc+Lgq3C9cN7q9y/ijiIBv1oQfDNE88ZHYiraLMyZ4WJx FdK5MJhK+DG0LmeAT7UTyUK6efQ7gVfmacCPEQtdiqg+8FT14BK0sQdTO0XsSyDn4h7e Zoig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ivI26akOyzNjxb/QZJE9El9S7eMR9ZQApKzypjYBa4Y=; b=bTyv0GM2xFn/klyqQnCOvYn0Dzy2Fkzewbmxz40rJNQPlWD+ofuLEIc0HTryDsT2gX tg9DBv5iWnEvizE+muAsx/1BXlHxIGJ7SVTQv+D/GakjE7qWE0sZ7MQVeUHj8o58dS3H ekr9x7Al6tjEdOq1LKGZW+qGOcvK78+pxUB8th/d2407zU74+2QslV7+2bWys6A+WF7n vunqzIWU+hALie9DBGc12rWP5H3srisroZBrD5NWbcXdXnID16oPUEBas4gKzMQo6sJS mOKgCRpkd7za4rUgNen3yhPeecNcV89q/rHwXHFPBlUpRFPcr3um10w0PaKr/4fOc7ZE rWXg== X-Gm-Message-State: APjAAAW7Q6eGwmC9Sn6OUfrkTT4z4b3Yecode4ZrXjEg2pk1lWMIA+Kd gn9DsryIMdP1YrY3RX4ge10cm4a+ X-Google-Smtp-Source: APXvYqzJtssLQ/w/NWyYAO397w71b+NcVMpFJGDy5L8da8OxgEGn94ZV4j5c0mdUg1wiyDrw6O5zaQ== X-Received: by 2002:a0c:b107:: with SMTP id q7mr76029715qvc.77.1555552331778; Wed, 17 Apr 2019 18:52:11 -0700 (PDT) From: "Daniel P. Smith" X-Google-Original-From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Date: Wed, 17 Apr 2019 21:52:03 -0400 Message-Id: <20190418015203.1636-1-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH] golang/xenlight: Fixing compilation for go 1.11 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: George Dunlap MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This deals with two casting issues for compiling under go 1.11: - explicitly cast to *C.xentoollog_logger for Ctx.logger pointer - add cast to unsafe.Pointer for the C string cpath Signed-off-by: Daniel P. Smith Reviewed-by: George Dunlap --- tools/golang/xenlight/xenlight.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenl= ight.go index 9c37e59ec0..47bb27a0f9 100644 --- a/tools/golang/xenlight/xenlight.go +++ b/tools/golang/xenlight/xenlight.go @@ -854,7 +854,7 @@ func (Ctx *Context) Open() (err error) { } =20 ret :=3D C.libxl_ctx_alloc(&Ctx.ctx, C.LIBXL_VERSION, - 0, unsafe.Pointer(Ctx.logger)) + 0, (*C.xentoollog_logger)(unsafe.Pointer(Ctx.logger))) =20 if ret !=3D 0 { err =3D Error(-ret) @@ -869,7 +869,7 @@ func (Ctx *Context) Close() (err error) { if ret !=3D 0 { err =3D Error(-ret) } - C.xtl_logger_destroy(unsafe.Pointer(Ctx.logger)) + C.xtl_logger_destroy((*C.xentoollog_logger)(unsafe.Pointer(Ctx.logger))) return } =20 @@ -1170,7 +1170,7 @@ func (Ctx *Context) ConsoleGetTty(id Domid, consNum i= nt, conType ConsoleType) (p err =3D Error(-ret) return } - defer C.free(cpath) + defer C.free(unsafe.Pointer(cpath)) =20 path =3D C.GoString(cpath) return @@ -1190,7 +1190,7 @@ func (Ctx *Context) PrimaryConsoleGetTty(domid uint32= ) (path string, err error) err =3D Error(-ret) return } - defer C.free(cpath) + defer C.free(unsafe.Pointer(cpath)) =20 path =3D C.GoString(cpath) return --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel