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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Jan 2012 16:17:58 +0900
From:	Namhyung Kim <namhyung.kim@....com>
To:	David Daney <ddaney.cavm@...il.com>
CC:	linux-kernel@...r.kernel.org, David Daney <david.daney@...ium.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Joerg Roedel <joerg.roedel@....com>, namhyung@...il.com
Subject: Re: [PATCH] perf: Fix broken build by rearranging some #includes

Hi,

2012-01-17 11:01 AM, David Daney wrote:
> From: David Daney<david.daney@...ium.com>
>
> When building on my Debian/mips system, util/util.c fails to build
> because commit 1aed2671738785e8f5aea663a6fda91aa7ef59b5 (perf kvm: Do
> guest-only counting by default) indirectly includes stdio.h before the
> feature selection in util.h is done.  This prevents _GNU_SOURCE in
> util.h from enabling the declaration of getline(), from now second
> inclusion of stdio.h, and the build is broken.

I've experienced similar problem wrt pwrite() last week. The fix was 
simply removing ctype.h from inclusion for my case.


>
> There is another breakage in util/evsel.c caused by include ordering,
> but I didn't fully track down the commit that caused it.
>
> Since the #include situation is a little convoluted throughout perf, I
> did the following:
>
> 1) Always include util/util.h before all other include files.
>
> 2) Remove all #define _GNU_SOURCE, as it is already done in util.h.
>
> 3) Remove all #undef _GNU_SOURCE, as they don't do what a naive person
>     might expect (or much of anything for that matter) and clutter up
>     the source.
>
> 4) #include ctype.h in util.h, so that ctype things have uniform
>     definitions throughout perf.

Among other things, ctype.h isn't needed at all since util.h redefines 
all of ctype macros anyway. I've posted a patch which removes ctype.h 
inclusions as Ingo's suggestion.

https://lkml.org/lkml/2012/1/16/510


Thanks,
Namhyung Kim
--
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