blob: 42cebf94ac3d52421d55a4dd7dc86083cd142c4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Fix build for x32
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Fix build error of src/common/utils.c for x32.
Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/150]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c
index 0e96ef0c..5c79c8c7 100644
--- a/src/bin/lttng/utils.c
+++ b/src/bin/lttng/utils.c
@@ -158,7 +158,7 @@ unsigned int fls_u32(uint32_t x)
#define HAS_FLS_U32
#endif
-#if defined(__x86_64)
+#if defined(__x86_64) && !defined(__ILP32__)
static inline
unsigned int fls_u64(uint64_t x)
{
diff --git a/src/common/utils.c b/src/common/utils.c
index 08139e5e..3c389981 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1223,7 +1223,7 @@ static inline unsigned int fls_u32(uint32_t x)
#define HAS_FLS_U32
#endif
-#if defined(__x86_64)
+#if defined(__x86_64) && !defined(__ILP32__)
static inline
unsigned int fls_u64(uint64_t x)
{
|