Skip to contentSkip to conversation

-2.6.10-rc2: Fix Link Error osst.o, st.o

PATCH New Bryan Batten 1 participant 1 message Nov 16, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 -2.6.10-rc2: Fix Link Error osst.o, st.o

After patching up to 2.6.10-rc2, I get the following error when building the kernel with gcc 2.95:

drivers/scsi/osst.o(.bss+0x0): multiple definition of `ST_partstat' drivers/scsi/st.o(.bss+0x0): first defined here
make[2]: *** [drivers/scsi/built-in.o] Error 1
make[1]: *** [drivers/scsi] Error 2

The error occurs because the change from 'typedef struct {...} ST_buffer;' to 'struct st_buffer {...} ST_buffer;' causes storage to be allocated more than once.

The fix is to just remove the 'ST_buffer' part from the changed structure definition.

Here's the patch to drivers/scsi/st.h:

# diff -up *orig/drivers/scsi/st.h *x/drivers/scsi/st.h
--- *orig/drivers/scsi/st.h     Mon Nov 15 22:44:18 2004
+++ linux-2.6x/drivers/scsi/st.h        Tue Nov 16 01:27:19 2004
@@ -67,7 +67,7 @@ struct st_partstat {
        u32 last_block_visited;
        int drv_block;          /* The block where the drive head is */
        int drv_file;
-} ST_partstat;
+};

#define ST_NBR_PARTITIONS 4

(Signed-off-by: Bryan Batten <[email protected]>)