New linux-kernel-headers breaks __u64 on x86
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-kernel-headers (Ubuntu) |
Fix Released
|
Medium
|
Jeff Bailey |
Bug Description
With the new linux-kernel-
-std=c99 (This doesn't happen on the old 2.5.99 ones)
Essentially, if STRICT_ANSI is defined (which it is with -std=c99), then the
types arent defined.
-- (from linux/types.h) --
#if defined(__GNUC__) && !defined(
typedef __u64 uint64_t; /* <stdint.h> */
typedef __u64 u_int64_t; /* <sys/types.h> */
typedef __s64 int64_t; /* <stdint.h>, <sys/types.h> */
#endif
#if defined(__GNUC__)
#if !defined(
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;
#endif
#endif
-- (linux/types.h) --
In the 2.5.99 headers, in asm/types.h, it looked like this
#if defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#end
This breaks if you for example, include rtnetlink.h, as it wants __u64 types on
line 582. (while using -std=c99)
OK, so its 1:30am, and I suck and wasn't paying attention to the ordering of the
typedef paramters. :)
Those are the wrong typedefs, mine from asm-i386/types.h actually look like this
#if defined(__GNUC__) && !defined( __STRICT_ ANSI__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
So, essentially, it's the same problem.
Is this due to ansi C not allowing 64-bit types and we can't use rtnetlink.h
with standard c99 and the old 2.5.999 headers were buggy/wrong?