Package: etherboot
Version: 5.3.14-1
Severity: serious
Tags: patch

etherboot fails to build because it contains some code that GCC 4.0
treats as an error:

> gcc -DCONFIG_PCI -DCONFIG_ISA -DASK_BOOT=3 -DBOOT_FIRST=BOOT_NIC 
> -DALLOW_ONLY_ENCAPSULATED -DBACKOFF_LIMIT=7 -DCONGESTED -DTAGGED_IMAGE 
> -DELF_IMAGE -DDOWNLOAD_PROTO_TFTP -DPXE_IMAGE -DPXE_EXPORT -Os -ffreestanding 
> -Wall -W -Wno-format -DPCBIOS -fstrength-reduce -fomit-frame-pointer 
> -march=i386 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mcpu=i386 
> -DVERSION_MAJOR=5 -DVERSION_MINOR=3 -DVERSION=\"5.3.14\"  -I include -I 
> arch/i386/include -DARCH=i386 -o bin/basemem.o -c 
> arch/i386/firmware/pcbios/basemem.c
> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> arch/i386/firmware/pcbios/basemem.c:90: error: static declaration of 
> '_allot_base_memory' follows non-static declaration
> arch/i386/firmware/pcbios/basemem.c:19: error: previous declaration of 
> '_allot_base_memory' was here
> arch/i386/firmware/pcbios/basemem.c:160: error: static declaration of 
> '_forget_base_memory' follows non-static declaration
> arch/i386/firmware/pcbios/basemem.c:20: error: previous declaration of 
> '_forget_base_memory' was here
> arch/i386/firmware/pcbios/basemem.c:224: error: static declaration of 
> 'free_unused_base_memory' follows non-static declaration
> include/etherboot.h:317: error: previous declaration of 
> 'free_unused_base_memory' was here

The attached patch fixes these problems.

-- 
Matt
only in patch2:
unchanged:
--- etherboot-5.3.14.orig/src/arch/i386/firmware/pcbios/basemem.c
+++ etherboot-5.3.14/src/arch/i386/firmware/pcbios/basemem.c
@@ -16,8 +16,8 @@
 #define FREE_BASE_MEMORY ( (uint32_t) ( *fbms << 10 ) )
 
 /* Prototypes */
-void * _allot_base_memory ( size_t size );
-void _forget_base_memory ( void *ptr, size_t size );
+static void * _allot_base_memory ( size_t size );
+static void _forget_base_memory ( void *ptr, size_t size );
 
 typedef struct free_base_memory_block {
        uint32_t        magic;
@@ -221,7 +221,7 @@
  * entity (if we can detect that it has done so) so that we get the
  * chance to free up our own blocks.
  */
-static void free_unused_base_memory ( void ) {
+void free_unused_base_memory ( void ) {
        free_base_memory_block_t *free_block = NULL;
 
        /* Try to release memory back to the BIOS.  Free all
only in patch2:
unchanged:
--- etherboot-5.3.14.orig/src/drivers/net/natsemi.c
+++ etherboot-5.3.14/src/drivers/net/natsemi.c
@@ -646,7 +646,7 @@
 
     to = currticks() + TX_TIMEOUT;
 
-    while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
+    while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
         /* wait */ ;
 
     if (currticks() >= to) {
only in patch2:
unchanged:
--- etherboot-5.3.14.orig/src/drivers/net/sis900.c
+++ etherboot-5.3.14/src/drivers/net/sis900.c
@@ -1132,7 +1132,7 @@
 
     to = currticks() + TX_TIMEOUT;
 
-    while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
+    while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
         /* wait */ ;
 
     if (currticks() >= to) {

Attachment: signature.asc
Description: Digital signature

Reply via email to