← Commit list

8cb40361c

Denys Vlasenko
Denys Vlasenko
2010-03-06
FAILED Duration: 30s

Subject

libbb/loop.c: use common fix_u32.h trick

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

include/fix_u32.h+6 -0
@@ -8,28 +8,34 @@
#ifndef FIX_U32_H
#define FIX_U32_H 1
+#undef __u64
#undef u64
#undef u32
#undef u16
#undef u8
+#undef __s64
#undef s64
#undef s32
#undef s16
#undef s8
+#define __u64 bb_hack_u64
#define u64 bb_hack_u64
#define u32 bb_hack_u32
#define u16 bb_hack_u16
#define u8 bb_hack_u8
+#define __s64 bb_hack_s64
#define s64 bb_hack_s64
#define s32 bb_hack_s32
#define s16 bb_hack_s16
#define s8 bb_hack_s8
+typedef uint64_t __u64;
typedef uint64_t u64;
typedef uint32_t u32;
typedef uint16_t u16;
typedef uint8_t u8;
+typedef int64_t __s64;
typedef int64_t s64;
typedef int32_t s32;
typedef int16_t s16;
libbb/loop.c+1 -5
@@ -8,6 +8,7 @@
* Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/
#include "libbb.h"
+#include "fix_u32.h" /* hack, so we may include kernel's linux/loop.h */
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -15,11 +16,6 @@
/* For 2.6, use the cleaned up header to get the 64 bit API. */
/* linux/loop.h relies on __u64. Make sure we have that as a proper type
* until userspace is widely fixed. */
-# if (defined __INTEL_COMPILER && !defined __GNUC__) \
- || (defined __GNUC__ && defined __STRICT_ANSI__)
-__extension__ typedef long long __s64;
-__extension__ typedef unsigned long long __u64;
-# endif
# include <linux/loop.h>
typedef struct loop_info64 bb_loop_info;
# define BB_LOOP_SET_STATUS LOOP_SET_STATUS64