From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCC20A09E0; Fri, 13 Nov 2020 14:00:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B7F49C87C; Fri, 13 Nov 2020 14:00:55 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 6990CC87C for ; Fri, 13 Nov 2020 14:00:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605272451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2MGFh9FyWQjDjSkTIgshb635gQhKBA/VBX+xcL1NJtU=; b=ibIxu8jREImH/+SZt4eSkNNWVQCmwEe3ld654ESi3DOiSArM22ZKw/n3xHleCC2UhRqcjW OT5dTIUdOkpMo0NZH0KxGdlthJiz8zBq1fu2T0dAfh/zEIRnxT+nYFJ4kBFvFTvpnB5YLU F7FmAIRXM04CSxcIWGOPQ5hq0PeBTnU= 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-90-AxHuDU7LPqiDYigrFtEROQ-1; Fri, 13 Nov 2020 08:00:50 -0500 X-MC-Unique: AxHuDU7LPqiDYigrFtEROQ-1 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 EE077835BBF; Fri, 13 Nov 2020 13:00:48 +0000 (UTC) Received: from [10.36.110.32] (unknown [10.36.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 604025C1C2; Fri, 13 Nov 2020 13:00:47 +0000 (UTC) To: David Marchand , dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Chenbo Xia , Jin Yu References: <20201110151219.4893-1-david.marchand@redhat.com> <20201113122430.25354-1-david.marchand@redhat.com> <20201113122430.25354-9-david.marchand@redhat.com> From: Maxime Coquelin Message-ID: Date: Fri, 13 Nov 2020 14:00:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201113122430.25354-9-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 08/11] examples/vhost_blk: fix build with pkg-config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/13/20 1:24 PM, David Marchand wrote: > vhost_blk.c: In function ‘ctrlr_worker’: > vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’ > [-Wimplicit-function-declaration] > 543 | CPU_ZERO(&cpuset); > | ^~~~~~~~ > vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’ > [-Wimplicit-function-declaration] > 544 | CPU_SET(0, &cpuset); > | ^~~~~~~ > vhost_blk.c:545:2: warning: implicit declaration of function > ‘pthread_setaffinity_np’ [-Wimplicit-function-declaration] > 545 | pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset); > | ^~~~~~~~~~~~~~~~~~~~~~ > /usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker': > vhost_blk.c:(.text+0x1076): undefined reference to `CPU_ZERO' > /usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to > `CPU_SET' > collect2: error: ld returned 1 exit status > gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1 > > Explicitly pass _GNU_SOURCE and include missing headers (rather than > rely on automagic inclusion from other system headers). > > Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") > > Signed-off-by: David Marchand > Acked-by: Bruce Richardson > --- > examples/vhost_blk/vhost_blk.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c > index 8f5d61a589..bb293d492f 100644 > --- a/examples/vhost_blk/vhost_blk.c > +++ b/examples/vhost_blk/vhost_blk.c > @@ -2,6 +2,12 @@ > * Copyright(c) 2010-2019 Intel Corporation > */ > > +#ifndef _GNU_SOURCE > +#define _GNU_SOURCE > +#endif > +#include > +#include > + > #include > #include > #include > Reviewed-by: Maxime Coquelin