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 F3500A09E0; Sat, 14 Nov 2020 10:08:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A7DB5C952; Sat, 14 Nov 2020 10:06:22 +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 96867C952 for ; Sat, 14 Nov 2020 10:06:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605344779; 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=XkyUUOpNRj3yZxU1CVOXeIuq+5k7DHQ9AxnGXfIrbEI=; b=aTfJPJQQbqnwWmqQW3/lRHpy1PF0eNbXT2KRXbpnW1uzWLlUGHuJYqdr4wFIqvV3bv6dwV 1Ywsq0eNBTrdTD+PIRTTQfkCYtA+d3/VWCAzs62zpuHayz6Cr7CJAccARqfANKNVdqZ671 9pqeO+Rq/YMGLRI/xoCrU5bC7bWGX/I= 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-310-dmDr1jf2MCqd4PNtBATXWQ-1; Sat, 14 Nov 2020 04:06:15 -0500 X-MC-Unique: dmDr1jf2MCqd4PNtBATXWQ-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 7CC8364092; Sat, 14 Nov 2020 09:06:14 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9E185C22A; Sat, 14 Nov 2020 09:06:08 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Maxime Coquelin , Chenbo Xia , Jin Yu Date: Sat, 14 Nov 2020 10:05:31 +0100 Message-Id: <20201114090533.6059-10-david.marchand@redhat.com> In-Reply-To: <20201114090533.6059-1-david.marchand@redhat.com> References: <20201110151219.4893-1-david.marchand@redhat.com> <20201114090533.6059-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 09/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" 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 -- 2.23.0