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 973B5A09E0; Fri, 13 Nov 2020 13:27:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 686E3C928; Fri, 13 Nov 2020 13:25:16 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 48CF2C928 for ; Fri, 13 Nov 2020 13:25:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605270313; 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=G1Tf4SqpMfsvHhCj1cXgjoS//nOK6CCccUsJN6tRbvSbfvuoPHfY4plg8cvthtYftZIneQ n0kmSnX3O7qKfeiOqSJgCjcLN0egrUFT58T3kKPk4ZqjXhf5HACe/AZdV+mVEsDolfRWCh gMvipmYIZSyyzqr8sKSmtbvs8Xz0ZVw= 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-407-hvq5_T41Oja6t_zTSKnCgw-1; Fri, 13 Nov 2020 07:25:12 -0500 X-MC-Unique: hvq5_T41Oja6t_zTSKnCgw-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 8EACC8030AB; Fri, 13 Nov 2020 12:25:10 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 51A905C1C2; Fri, 13 Nov 2020 12:25:05 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, Maxime Coquelin , Chenbo Xia , Jin Yu Date: Fri, 13 Nov 2020 13:24:27 +0100 Message-Id: <20201113122430.25354-9-david.marchand@redhat.com> In-Reply-To: <20201113122430.25354-1-david.marchand@redhat.com> References: <20201110151219.4893-1-david.marchand@redhat.com> <20201113122430.25354-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 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" 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