lkml.org 
[lkml]   [2017]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 33/35] perf bench futex: Fix build on musl + clang
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 <string.h> or explicitly provide a declaration for 'memset'

> In my opinion the musl <shed.h> header file should include <string.h>.

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

\
 
 \ /
  Last update: 2017-09-08 15:50    [W:0.140 / U:58.960 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site