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

From: Bryan Batten
Date: Tue Nov 16 2004 - 05:14:06 EST


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 <BryanBatten@xxxxxxxxxxxxxx>)





-
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/