From 83e1a0bad836f8950cb1e38924bf2600f118861e Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Thu, 14 Dec 2017 13:49:33 +0100 Subject: [PATCH] lvm2app: Suppress deprecation warnings for our builds --- liblvm/lvm2app.h | 2 ++ make.tmpl.in | 2 ++ python/liblvm.c | 1 + 3 files changed, 5 insertions(+) diff --git a/liblvm/lvm2app.h b/liblvm/lvm2app.h index f64262d32..10ecd2ea6 100644 --- a/liblvm/lvm2app.h +++ b/liblvm/lvm2app.h @@ -18,7 +18,9 @@ #include +#ifndef _BUILDING_LVM #warning "liblvm2app is deprecated, use D-Bus API instead." +#endif #ifdef __cplusplus extern "C" { diff --git a/make.tmpl.in b/make.tmpl.in index 65362d87c..bdf234918 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -261,6 +261,8 @@ endif # end of fPIC protection endif +DEFS += -D_BUILDING_LVM + LDFLAGS += -L$(top_builddir)/libdm -L$(top_builddir)/lib CLDFLAGS += -L$(top_builddir)/libdm -L$(top_builddir)/lib diff --git a/python/liblvm.c b/python/liblvm.c index 6d67b8b3a..06120e61a 100644 --- a/python/liblvm.c +++ b/python/liblvm.c @@ -22,6 +22,7 @@ */ #include +#define _BUILDING_LVM #include "lvm2app.h" #include "defaults.h"