Re: Commit 085219f79cad broke Sparc-32 back in 2.6.28.

From: Rob Landley
Date: Fri Mar 26 2010 - 23:36:04 EST


On Sunday 21 February 2010 20:06:58 David Miller wrote:
> Here's the fix I'll use, thanks for the report Rob:
>
> sparc32: Fix struct stat uid/gid types.
>
> Commit 085219f79cad89291699bd2bfb21c9fdabafe65f
> ("sparc32: use proper types in struct stat")

Unfortunately, while this fix makes sparc buidl and run again, the exported
kernel headers are horked and can't build strace natively.

gcc -DHAVE_CONFIG_H -I. -Ilinux/sparc -I./linux/sparc -Ilinux -I./linux -
Wall --static -MT file.o -MD -MP -MF .deps/file.Tpo -c -o file.o file.c
In file included from file.c:88:
/usr/bin/../include/asm/stat.h:56: error: expected specifier-qualifier-list
before 'uid16_t'
file.c: In function 'realprintstat':
file.c:951: warning: format '%lu' expects type 'long unsigned int', but
argument 2 has type 'unsigned int'
make[1]: *** [file.o] Error 1
make[1]: Leaving directory `/home/strace-4.5.19'
make: *** [all] Error 2

The problem is that uid16_t is a kernel internal type that gets cleaned out of
the headers when they're exported, thus there's no definition for userspace to
pick up if that structure is ever used from a userspace build.

What exactly was the problem with just saying "unsigned short" when you mean
an unsigned short? The way x86 does, and arm? (If these ever change, it
breaks binary compatability. Not sure what these changes were trying to
accomplish...)

Rob
--
Latency is more important than throughput. It's that simple. - Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/