liblvm: Raise WARNS to 1.
authorSascha Wildner <saw@online.de>
Tue, 5 Oct 2010 07:50:19 +0000 (09:50 +0200)
committerSascha Wildner <saw@online.de>
Tue, 5 Oct 2010 07:50:19 +0000 (09:50 +0200)
Since __BSD_VISIBLE is unset for liblvm compilation, we need to add the
standard define for alloca() (taken from <stdlib.h>) to lib.h to prevent
warnings.

While here, clean up the Makefile a bit, too.

contrib/lvm2/dist/include/lib.h
gnu/lib/liblvm/Makefile

index da7d8ad..4799dcb 100644 (file)
@@ -47,4 +47,6 @@
 //#include <unistd.h>
 #include <sys/stat.h>
 
+#define alloca(sz) __builtin_alloca(sz)
+
 #endif
index 8923c5f..8841560 100644 (file)
@@ -8,17 +8,7 @@ SHLIB_MAJOR?=  0
 LVM2_DISTDIR=  ${LVM2_DIR}/dist
 
 CFLAGS+=       -D_XOPEN_SOURCE=600
-CFLAGS+=       -I${LVM2_DISTDIR}/lib -I${LVM2_DISTDIR}/include \
-               -I. 
-
-# Some parts of liblvm can't be protected because if its
-# alloca() usage.
-#
-.if defined(USE_SSP) && (${USE_SSP} != "no")
-CPPFLAGS+=     -Wno-stack-protector
-.endif
-
-CPPFLAGS.imLcLkup.c=-Wno-error
+CFLAGS+=       -I${LVM2_DISTDIR}/include
 
 SRCS+=         activate.c lvmcache.c toolcontext.c config.c btree.c \
                str_list.c dev-cache.c dev-io.c dev-md.c device.c dev-swap.c \
@@ -40,6 +30,8 @@ SRCS+=                activate.c lvmcache.c toolcontext.c config.c btree.c \
 
 LDADD+=                -lprop -ldevattr
 
+WARNS?=                1
+
 .PATH: ${LVM2_DISTDIR}/lib/
 .PATH: ${LVM2_DISTDIR}/lib/activate
 .PATH: ${LVM2_DISTDIR}/lib/cache