Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158739 - linux-headers-2.6.19 breaks applications that uses u64 and the c99 standard
Summary: linux-headers-2.6.19 breaks applications that uses u64 and the c99 standard
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://bugzilla.kernel.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-21 07:41 UTC by Roy Marples (RETIRED)
Modified: 2006-12-21 08:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix u64 when using c99 (types-c99.patch,361 bytes, patch)
2006-12-21 08:01 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Marples (RETIRED) gentoo-dev 2006-12-21 07:41:53 UTC
like dhcpcd

cc -D_BSD_SOURCE -O2 -pipe -pedantic -std=c99 -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wno-format-nonliteral -Wsequence-point -Wextra -Wdeclaration-after-statement -c interface.c
In file included from /usr/include/linux/rtnetlink.h:5,
                 from interface.c:33:
/usr/include/linux/if_link.h:43: error: expected specifier-qualifier-list before 
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-12-21 07:41:53 UTC
like dhcpcd

cc -D_BSD_SOURCE -O2 -pipe -pedantic -std=c99 -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wno-format-nonliteral -Wsequence-point -Wextra -Wdeclaration-after-statement -c interface.c
In file included from /usr/include/linux/rtnetlink.h:5,
                 from interface.c:33:
/usr/include/linux/if_link.h:43: error: expected specifier-qualifier-list before __u64
In file included from /usr/include/linux/rtnetlink.h:7,
                 from interface.c:33:
/usr/include/linux/neighbour.h:92: error: expected specifier-qualifier-list before __u64
make: *** [interface.o] Error 1

This error is generated because asm/types.h does not define __u64 if __STRICT_ANSI__ is defined by the std=c99 flag. Removal of this flag means we compile ok.

This error is new to 2.6.19
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-12-21 08:01:55 UTC
Created attachment 104517 [details, diff]
Fix u64 when using c99

u64 is defined by ISO C99, so this patch checks against the right define making dhcpcd work.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-12-21 08:20:42 UTC
I'm a nice guy - filed upstream
http://bugzilla.kernel.org/show_bug.cgi?id=7724
Comment 4 SpanKY gentoo-dev 2006-12-21 08:52:21 UTC
yeah that's wrong ... the purpose was to make sure u64 never makes it while strict ansi is defined

i think your trouble lies with the fact that -std=c99 turns on strict ansi while -std=gnu99 does not

vapier@G5[ppc] 0 ~ $ echo "" | cpp -dD | grep -i ansi
vapier@G5[ppc] 0 ~ $ echo "" | cpp -dD -std=c99 | grep -i ansi
#define __STRICT_ANSI__ 1
vapier@G5[ppc] 0 ~ $ echo "" | cpp -dD -std=gnu99 | grep -i ansi
vapier@G5[ppc] 0 ~ $
Comment 5 SpanKY gentoo-dev 2006-12-21 08:52:58 UTC
we'll just take this to the upstream URL