lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 4 Apr 2010 16:34:43 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org, h.mitake@...il.com,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH] Swap including order of util.h and string.h of
	util/string.c

On Sun, Apr 04, 2010 at 05:13:18PM +0900, Hitoshi Mitake wrote:
> Current util/string.c includes headers in this order: string.h, util.h
> But this causes build error because __USE_GNU definition
> is needed for strndup() definition like this,
> % make -j
> touch .perf.dev.null
>     CC util/string.o
> cc1: warnings being treated as errors
> util/string.c: In function ‘argv_split’:
> util/string.c:171: error: implicit declaration of function ‘strndup’
> util/string.c:171: error: incompatible implicit declaration of built-in function ‘strndup’


Thanks, I've queued it as I have the same problem and I'm
about to send a perf/core queue.



> 
> So this patch swaps order of including headers.
> util.h defines _GNU_SOURCE, and /usr/include/features.h defines __USE_GNU as 1
> if _GNU_SOURCE is defined.
> 
> Signed-off-by: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  tools/perf/util/string.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
> index d438924..0409fc7 100644
> --- a/tools/perf/util/string.c
> +++ b/tools/perf/util/string.c
> @@ -1,5 +1,5 @@
> -#include "string.h"
>  #include "util.h"
> +#include "string.h"
>  
>  #define K 1024LL
>  /*
> -- 
> 1.6.5.2
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ