[PATCH] Fix 2.6.7 Alpha compilation

From: Peter Chubb (peterc_at_gelato.unsw.edu.au)
Date: 06/29/04

  • Next message: Ulrich Drepper: "inconsistency between SIOCGIFCONF and SIOCGIFNAME"
    To: akpm@osdl.org, linux-kernel@vger.kernel.org
    Date:	Tue, 29 Jun 2004 13:58:03 +1000
    
    

    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Ulrich Drepper: "inconsistency between SIOCGIFCONF and SIOCGIFNAME"

    Relevant Pages

    • Re: 2.6.10-mm3: swsusp: out of memory on resume (was: Re: Ho ho ho - Linux v2.6.10)
      ... Try Lukas's patch, ... +static int __init does_collide_order(unsigned long addr, ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [PATCH] include/linux/etherdevice.h, kernel 2.6.14
      ... How is this an optimisation? ... static int is_zero_ether_addr1(const u8 *addr) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • bus_to_virt equivalent
      ... DMA-mapping scheme. ... dma_addr_t addr = pci_map_page(dev, page, offset, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] cpumask 4/10 uninline find_next_bit on ia64
      ... * Find next zero bit in a bitmap reasonably efficiently.. ... -find_next_zero_bit (void *addr, unsigned long size, unsigned long offset) ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [PATCH 5/5] vmalloc: use list of pages instead of array in vm_struct
      ... extern void *vmap(struct page **pages, unsigned int count, ... extern void vunmap(void *addr); ... static int map_area_pte(pte_t *pte, unsigned long address, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)