Skip to content

Commit cec80d8

Browse files
bwhacksmattst88
authored andcommitted
alpha: uapi: Add support for __SANE_USERSPACE_TYPES__
This fixes compiler errors in perf such as: tests/attr.c: In function 'store_event': tests/attr.c:66:27: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64 {aka long unsigned int}' [-Werror=format=] snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir, ^ Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Michael Cree <mcree@orcon.net.nz> Cc: stable@vger.kernel.org Signed-off-by: Matt Turner <mattst88@gmail.com>
1 parent 7817ced commit cec80d8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

arch/alpha/include/asm/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef _ALPHA_TYPES_H
22
#define _ALPHA_TYPES_H
33

4-
#include <asm-generic/int-ll64.h>
4+
#include <uapi/asm/types.h>
55

66
#endif /* _ALPHA_TYPES_H */

arch/alpha/include/uapi/asm/types.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@
99
* need to be careful to avoid a name clashes.
1010
*/
1111

12-
#ifndef __KERNEL__
12+
/*
13+
* This is here because we used to use l64 for alpha
14+
* and we don't want to impact user mode with our change to ll64
15+
* in the kernel.
16+
*
17+
* However, some user programs are fine with this. They can
18+
* flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
19+
*/
20+
#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__)
1321
#include <asm-generic/int-l64.h>
22+
#else
23+
#include <asm-generic/int-ll64.h>
1424
#endif
1525

1626
#endif /* _UAPI_ALPHA_TYPES_H */

0 commit comments

Comments
 (0)