From patchwork Mon Feb 4 14:43:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 1035997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tWJl5g2Jz9sDL for ; Tue, 5 Feb 2019 02:07:03 +1100 (AEDT) Received: from localhost ([127.0.0.1]:44158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfpt-0001T9-JH for incoming@patchwork.ozlabs.org; Mon, 04 Feb 2019 10:07:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfaa-00066m-9s for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:51:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqfTV-0005d1-AW for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:54 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:39280) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqfTV-0005cB-2y for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:53 -0500 Received: by mail-qt1-f178.google.com with SMTP id u47so88529qtj.6 for ; Mon, 04 Feb 2019 06:43:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=SNevDXzYBcJYIKhAPuL+SO+bEaMP+mfAREqmy0TzaSo=; b=PqD3A3K2GVWczQ1s8s76bLDl1AhsAms1Ovtx3tY1PLOsCCDdeyQsgsk5qs+svT5c6U XfWRKRQTiWRFJUvi4RBNg+8HS3hurttu3yazHmwwqRZvYL+y8YeZoa/S3G0aXB7xoEx8 bIxKZfh0VwVFC4r7IoeYBX0hHy1wx5+M2GPaBjAjaIOpegc5u8F1pfOagAIzpBovIcg4 7Ml9/qRU2U1BHE8CeZzgwhQVL2cFyFBUouCGBmzInast7dUNzKVWueRACHw/DSnqgJQK gW16SoO41BgP4Tne2u/YMqaaa94luK8DAMLr5qFU3oHHNsKY7awkqMQfmfM3zduDpvsV LhVg== X-Gm-Message-State: AJcUukfGay6pP486ThoPU/y7zVKaXFOwWXxvK/IoNFZAuwNc4ZNIx1s7 uxt6c5HvZE9fFA/6llk8KC7YfwyhInE= X-Google-Smtp-Source: AHgI3IYRBig/2s7g3R14rII4OAMylQ7n5eVpXhMSb2H4/fjlMuhLOqbjwxEy9y8N01JeI5IzOZomjA== X-Received: by 2002:ac8:4258:: with SMTP id r24mr30887925qtm.213.1549291432001; Mon, 04 Feb 2019 06:43:52 -0800 (PST) Received: from redhat.com (pool-173-76-246-42.bstnma.fios.verizon.net. [173.76.246.42]) by smtp.gmail.com with ESMTPSA id j9sm2791738qki.80.2019.02.04.06.43.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 06:43:51 -0800 (PST) Date: Mon, 4 Feb 2019 09:43:50 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20190204142638.27021-17-mst@redhat.com> References: <20190204142638.27021-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190204142638.27021-1-mst@redhat.com> X-Mailer: git-send-email 2.17.1.1206.gb667731e2e.dirty X-Mutt-Fcc: =sent X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.178 Subject: [Qemu-devel] [PULL 16/25] contrib/vhost-user-blk: fix the compilation issue X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Changpeng Liu , Stefan Hajnoczi , Stefano Garzarella Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Changpeng Liu Signed-off-by: Changpeng Liu Reviewed-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/vhost-user-blk/vhost-user-blk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c index 858221ad95..49640dfdf2 100644 --- a/contrib/vhost-user-blk/vhost-user-blk.c +++ b/contrib/vhost-user-blk/vhost-user-blk.c @@ -20,6 +20,10 @@ #include "contrib/libvhost-user/libvhost-user-glib.h" #include "contrib/libvhost-user/libvhost-user.h" +#if defined(__linux__) +#include +#include +#endif struct virtio_blk_inhdr { unsigned char status; @@ -454,7 +458,7 @@ vub_get_blocksize(int fd) #if defined(__linux__) && defined(BLKSSZGET) if (ioctl(fd, BLKSSZGET, &blocksize) == 0) { - return blocklen; + return blocksize; } #endif