OSDN Git Service

[PATCH] build fix for lvm with gcc 4
authorWilly Tarreau <w@1wt.eu>
Fri, 27 Jul 2007 15:05:27 +0000 (17:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 4 Aug 2007 19:45:54 +0000 (21:45 +0200)
Reported by Marco Gatti :

I decided to upgrade from 2.4.34 to 2.4.35 in one of my servers but i
encountered a compile problem:

lvm.c:397: error: static declaration of 'vg_count' follows non-static
declaration
lvm-internal.h:48: error: previous declaration of 'vg_count' was here

I know this was an already fixed bug but now it seems to come out again
compiling 2.4.35 vanilla with gcc version 4.1.3 20070629 (prerelease) (Debian
4.1.2-13). 2.4.34.6 vanilla compiled fine.

Simple fix below tested and confirmed by Marco.

drivers/md/lvm.c

index e84b560..f5e200d 100644 (file)
@@ -394,7 +394,7 @@ static char pv_name[NAME_LEN];
 /* static char rootvg[NAME_LEN] = { 0, }; */
 static int lock = 0;
 static int _lock_open_count = 0;
-static uint vg_count = 0;
+uint vg_count = 0;
 static long lvm_chr_open_count = 0;
 static DECLARE_WAIT_QUEUE_HEAD(lvm_wait);