[PATCH] Fix 2.6.7 Alpha compilation

From: Peter Chubb
Date: Mon Jun 28 2004 - 22:59:41 EST



When using gcc 3.3.3 on alpha, the current BK head doesn't compile.
-- there's an external declaration for abs() in the same scope as
a macro definition in arch/alpha/time.c
-- The compiler is picky about `const' declarations, which breaks
on bitops.h.

Here's a patch to fix:

Index: linux-2.6-wip/include/asm-alpha/bitops.h
===================================================================
--- linux-2.6-wip.orig/include/asm-alpha/bitops.h
+++ linux-2.6-wip/include/asm-alpha/bitops.h
@@ -418,9 +418,9 @@
* Find next one bit in a bitmap reasonably efficiently.
*/
static inline unsigned long
-find_next_bit(void * addr, unsigned long size, unsigned long offset)
+find_next_bit(const void * addr, unsigned long size, unsigned long offset)
{
- unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
+ const unsigned long * p = ((const unsigned long *) addr) + (offset >> 6);
unsigned long result = offset & ~63UL;
unsigned long tmp;

Index: linux-2.6-wip/arch/alpha/kernel/time.c
===================================================================
--- linux-2.6-wip.orig/arch/alpha/kernel/time.c
+++ linux-2.6-wip/arch/alpha/kernel/time.c
@@ -523,7 +523,6 @@
* sets the minutes. Usually you won't notice until after reboot!
*/

-extern int abs(int);

static int
set_rtc_mmss(unsigned long nowtime)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/