New linux-kernel-headers breaks __u64 on x86

Bug #16781 reported by Trent Lloyd
6
Affects Status Importance Assigned to Milestone
linux-kernel-headers (Ubuntu)
Fix Released
Medium
Jeff Bailey

Bug Description

With the new linux-kernel-headers, the typedef for __u64 breaks when using
-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(__STRICT_ANSI__)
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(__STRICT_ANSI__) || defined(__LLH_TYPE_LONG_IS_64BIT__)
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)

Revision history for this message
Trent Lloyd (lathiat) wrote :

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?

Revision history for this message
Jeff Bailey (jbailey) wrote :

Ugh, c99 supports long long. I'll fix that and upload.

Tks,
Jeff Bailey

Revision history for this message
Jeff Bailey (jbailey) wrote :

Should be fixed in -0ubuntu6. Please let me know if you have further problems.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.