From b974f5b242814bf21c76e1d0de802283361488dc Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 13 Aug 2006 10:34:54 +0200 Subject: [GCC4] fix build error in drivers/ide/legacy/hd.c 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 --- drivers/ide/legacy/hd.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index 3c7b0e0..353a0e2 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c @@ -694,7 +694,11 @@ static int hd_release(struct inode * ino 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, @@ -718,12 +722,6 @@ static void hd_interrupt(int irq, void * 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 -- 1.4.2