lvm2: More cleanup (include <unistd.h>, use default CSTD, WARNS = 1).
authorSascha Wildner <saw@online.de>
Wed, 11 Mar 2015 20:09:12 +0000 (21:09 +0100)
committerSascha Wildner <saw@online.de>
Wed, 11 Mar 2015 20:09:12 +0000 (21:09 +0100)
<unistd.h> is required for some prototypes (getpid(), unlink(), ...).

WARNS?=2 requires some more work.

contrib/lvm2/dist/lib/commands/toolcontext.c
contrib/lvm2/dist/libdm/ioctl/libdm-netbsd.h
gnu/lib/libdevmapper/Makefile
gnu/lib/liblvm/Makefile
gnu/sbin/dmsetup/Makefile
gnu/sbin/lvm/Makefile
share/initrd/sbin.lvm/Makefile

index 33ccaa0..8edad10 100644 (file)
@@ -55,6 +55,7 @@
 #include <sys/utsname.h>
 #include <syslog.h>
 #include <time.h>
+#include <unistd.h>
 
 #ifdef linux
 #  include <malloc.h>
index 111856a..862bb39 100644 (file)
@@ -33,6 +33,7 @@
 #define __LIB_DM_H__
 
 #include <libprop/proplib.h>
+#include <unistd.h>
 
 #  define MAJOR(x) major((x))
 #  define MINOR(x) minor((x))
index 7b9a5f3..a7b72f1 100644 (file)
@@ -8,8 +8,6 @@ LVM2_DISTDIR=   ${LVM2_DIR}/dist
 LIB=           devmapper
 SHLIB_MAJOR?=  0
 
-CSTD?=         gnu89
-
 CFLAGS+=       -I${LIBDM_DISTDIR} -I${LIBDM_DISTDIR}/misc -I${LIBDM_DISTDIR}/mm \
                -I${LIBDM_DISTDIR}/datastruct -I${LIBDM_DISTDIR}/ioctl \
                -I${LVM2_DISTDIR}/include \
@@ -25,6 +23,8 @@ SRCS+=                bitset.c hash.c list.c libdm-common.c libdm-file.c \
                dbg_malloc.c pool.c matcher.c parse_rx.c ttree.c \
                libdm-dragonfly-iface.c libdm_dragonfly.c
 
+WARNS?=                1
+
 .PATH: ${LIBDM_DISTDIR}/
 .PATH: ${LIBDM_DISTDIR}/datastruct
 .PATH: ${LIBDM_DISTDIR}/mm
index 56225c9..49543f9 100644 (file)
@@ -27,7 +27,6 @@ SRCS+=                activate.c lvmcache.c toolcontext.c config.c btree.c \
                filter_dragonfly.c snapshot.c mirrored.c dev_manager.c fs.c \
                lvm-globals.c dev.c
 
-CSTD?=         gnu89
 WARNS?=                1
 
 .PATH: ${LVM2_DISTDIR}/lib/
index c50f9ff..b855888 100644 (file)
@@ -11,7 +11,7 @@ PROG=         dmsetup
 
 MAN=           dmsetup.8
 
-CSTD?=         gnu89
+WARNS?=                1
 
 CFLAGS+=       -I${LIBDM_DISTDIR}/ -I${LIBDM_DISTDIR}/misc \
                -I. -I${LIBDM_DISTDIR}/ioctl -I${LVM2_DISTDIR}/include
index 651c487..a21974b 100644 (file)
@@ -9,8 +9,6 @@ LIBDM_SRCDIR= ${LVM2_DIR}/lib/libdevmapper
 
 PROG=          lvm
 
-CSTD?=         gnu89
-
 SRCS=          dumpconfig.c formats.c lvchange.c lvconvert.c lvcreate.c \
                lvdisplay.c lvextend.c lvmchange.c lvmcmdline.c \
                lvmdiskscan.c lvreduce.c lvremove.c lvrename.c lvresize.c \
@@ -22,6 +20,8 @@ SRCS=         dumpconfig.c formats.c lvchange.c lvconvert.c lvcreate.c \
                vgmknodes.c vgreduce.c vgremove.c vgrename.c vgscan.c \
                vgsplit.c lvm.c
 
+WARNS?=                1
+
 CFLAGS+=       -I${LVM2_DISTDIR}/lib -I${LVM2_DISTDIR}/include \
                -I. -I${LVM2_DISTDIR}/tools \
                -I${LIBDM_DISTDIR}
index db53805..f7ef9bd 100644 (file)
@@ -11,8 +11,6 @@ LIBDM_SRCDIR= ${LVM2_DIR}/lib/libdevmapper
 
 PROG=          lvm
 
-CSTD?=         gnu89
-
 SRCS=          dumpconfig.c formats.c lvchange.c lvconvert.c lvcreate.c \
                lvdisplay.c lvextend.c lvmchange.c lvmcmdline.c \
                lvmdiskscan.c lvreduce.c lvremove.c lvrename.c lvresize.c \
@@ -24,6 +22,8 @@ SRCS=         dumpconfig.c formats.c lvchange.c lvconvert.c lvcreate.c \
                vgmknodes.c vgreduce.c vgremove.c vgrename.c vgscan.c \
                vgsplit.c lvm.c
 
+WARNS?=                1
+
 CFLAGS+=       -I${LVM2_DISTDIR}/lib -I${LVM2_DISTDIR}/include \
                -I. -I${LVM2_DISTDIR}/tools \
                -I${LIBDM_DISTDIR}