From: Mark Salter <msalter@redhat.com>
To: linux-arch@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, catalin.marinas@arm.com
Subject: possible problem with generic asm/types.h
Date: Sat, 25 May 2013 11:14:18 -0400 [thread overview]
Message-ID: <1369494858.25297.58.camel@t520.redhat.com> (raw)
While building some stuff for aarch64, I ran into a conflict between
the kernel's definition of __s64 and glibc's definition of int64_t.
The package I was building (fuse) does this:
#include <stdint.h>
#define __s64 int64_t
The kernel typedefs __s64 in asm/types.h and due to ordering of includes
in the fuse package sources, the kernel __s64 gets used at some points
while the fuse __s64 gets used in others. This leads to a build failure
on aarch64 because glibc typedefs int64_t as a long while kernel uses
long long for __s64. Both are 64bits but it creates a type conflict in
some of the fuse code. But this same fuse code builds on other arches so
I looked a further and found what I think is a problem with the kernel's
asm-generic/types.h file which has:
/*
* int-ll64 is used practically everywhere now,
* so use it as a reasonable default.
*/
#include <asm-generic/int-ll64.h>
Shouldn't this be:
#include <asm/bitsperlong.h>
#if __BITS_PER_LONG == 64
#include <asm-generic/int-l64.h>
#else
#include <asm-generic/int-ll64.h>
#endif
--Mark
next reply other threads:[~2013-05-25 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 15:14 Mark Salter [this message]
2013-05-25 16:01 ` possible problem with generic asm/types.h Geert Uytterhoeven
2013-05-25 16:37 ` Mark Salter
2013-05-25 16:39 ` Geert Uytterhoeven
2013-05-25 16:43 ` Mark Salter
2013-05-26 7:40 ` Geert Uytterhoeven
2013-05-26 10:32 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369494858.25297.58.camel@t520.redhat.com \
--to=msalter@redhat.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=linux-arch@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox