[PATCH 1.3.2] Fix compilation on MIPS (and possibly SPARC)
Atsushi Nemoto
anemo at mba.ocn.ne.jp
Sat Jan 27 08:24:49 PST 2007
e2fsprogs/ext2fs/unix_io.c checks SIZEOF_LONG on MIPS and SPARC, but
it seems nobody defines such macro. It was not noticed before just
because we did not use -Wundef. We can use __WORDSIZE instead of
SIZEOF_LONG (at least on glibc and uClibc).
--- busybox-1.3.2.org/e2fsprogs/ext2fs/unix_io.c 2007-01-21 05:16:54.000000000 +0900
+++ busybox-1.3.2/e2fsprogs/ext2fs/unix_io.c 2007-01-28 01:11:34.483145453 +0900
@@ -419,7 +419,7 @@
#ifdef __linux__
#undef RLIM_INFINITY
-#if (defined(__alpha__) || ((defined(__sparc__) || defined(__mips__)) && (SIZEOF_LONG == 4)))
+#if (defined(__alpha__) || ((defined(__sparc__) || defined(__mips__)) && (__WORDSIZE == 32)))
#define RLIM_INFINITY ((unsigned long)(~0UL>>1))
#else
#define RLIM_INFINITY (~0UL)
More information about the busybox
mailing list