Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753156AbdIHNsC (ORCPT ); Fri, 8 Sep 2017 09:48:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:37350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752712AbdIHNr4 (ORCPT ); Fri, 8 Sep 2017 09:47:56 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30DDB22A9E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Fri, 8 Sep 2017 10:47:54 -0300 From: Arnaldo Carvalho de Melo To: =?iso-8859-1?Q?J=F6rg?= Krause Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Davidlohr Bueso , Jiri Olsa , Namhyung Kim , Wang Nan Subject: Re: [PATCH 33/35] perf bench futex: Fix build on musl + clang Message-ID: <20170908134754.GD11725@kernel.org> References: <20170306193825.24011-1-acme@kernel.org> <20170306193825.24011-34-acme@kernel.org> <1504857845.6709.2.camel@embedded.rocks> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1504857845.6709.2.camel@embedded.rocks> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1243 Lines: 29 Em Fri, Sep 08, 2017 at 10:04:05AM +0200, J?rg Krause escreveu: > On Mon, 2017-03-06 at 16:38 -0300, Arnaldo Carvalho de Melo wrote: > > When building with clang on a musl libc system, Alpine Linux, we end up > > hitting a problem where memset() is used but its prototype is not > > present, add it to avoid this: > > bench/futex-wake.c:99:3: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' > > [-Werror,-Wimplicit-function-declaration] > > CPU_ZERO(&cpu); > > ^ > > /usr/include/sched.h:127:23: note: expanded from macro 'CPU_ZERO' > > #define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t),set) > > ^ > > /usr/include/sched.h:110:30: note: expanded from macro 'CPU_ZERO_S' > > #define CPU_ZERO_S(size,set) memset(set,0,size) > > ^ > > bench/futex-wake.c:99:3: note: include the header or explicitly provide a declaration for 'memset' > In my opinion the musl header file should include . Agreed. > I've reported the issue to the musl mailing list: > http://www.openwall.com/lists/musl/2017/09/08/1 Thanks for reporting that to them, - Arnaldo