This patch fixes this error with gcc 4 :
hd.c:721: error: static declaration of 'hd_fops' follows non-static declaration
hd.c:697: error: previous declaration of 'hd_fops' was here
make[4]: *** [hd.o] Error 1
make[4]: Leaving directory `/usr/src/git/linux-2.4/drivers/ide/legacy'
make[3]: *** [first_rule] Error 2
make[3]: Leaving directory `/usr/src/git/linux-2.4/drivers/ide/legacy'
make[2]: *** [_subdir_legacy] Error 2
make[2]: Leaving directory `/usr/src/git/linux-2.4/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/git/linux-2.4/drivers'
make: *** [_dir_drivers] Error 2
return 0;
}
-extern struct block_device_operations hd_fops;
+static struct block_device_operations hd_fops = {
+ open: hd_open,
+ release: hd_release,
+ ioctl: hd_ioctl,
+};
static struct gendisk hd_gendisk = {
major: MAJOR_NR,
sti();
}
-static struct block_device_operations hd_fops = {
- open: hd_open,
- release: hd_release,
- ioctl: hd_ioctl,
-};
-
/*
* This is the hard disk IRQ description. The SA_INTERRUPT in sa_flags
* means we run the IRQ-handler with interrupts disabled: this is bad for