summaryrefslogtreecommitdiff
path: root/libdm
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-04-06 22:31:23 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-04-06 22:31:23 +0200
commit6f6583afede02dddec41b85f896c9d4e73d87beb (patch)
treebf7c832efbc40d71f6c002fdfae7cb333dad16f7 /libdm
parent9980ed9527e73d8396f8e1ce877837c0355ba8dc (diff)
downloadlvm2-6f6583afede02dddec41b85f896c9d4e73d87beb.tar.gz
libdm: fix compiling with older gcc
Diffstat (limited to 'libdm')
-rw-r--r--libdm/misc/dmlib.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdm/misc/dmlib.h b/libdm/misc/dmlib.h
index 95f4b8ecb..0b937cdda 100644
--- a/libdm/misc/dmlib.h
+++ b/libdm/misc/dmlib.h
@@ -77,7 +77,10 @@
# endif
# endif
#ifndef DM_EXPORT_NEW_SYMBOL
-#define DM_EXPORT_NEW_SYMBOL(rettype, func, ver) rettype func
+#define DM_EXPORT_NEW_SYMBOL(rettype, func, ver) \
+ __typeof__(func) func ##_v ##ver; \
+ __asm__(".symver " #func "_v" #ver ", " #func "@@DM_" #ver ); \
+ rettype func ##_v ##ver
#define DM_EXPORT_SYMBOL(func, ver) \
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver );
#define DM_EXPORT_SYMBOL_BASE(func) \