[dm-devel] [PATCH] multipath-tools: replace 64bit archs macros by __LP64__
Xose Vazquez Perez
xose.vazquez at gmail.com
Fri May 19 01:38:18 UTC 2017
Rationale: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
__LP64__
_LP64
These macros are defined, with value 1, if (and only if) the compilation is
for a target where long int and pointer both use 64-bits and int uses 32-bit.
Cc: Christophe Varoqui <christophe.varoqui at opensvc.com>
Cc: device-mapper development <dm-devel at redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez at gmail.com>
---
kpartx/lopart.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kpartx/lopart.c b/kpartx/lopart.c
index 4e6dab4..3c16eb0 100644
--- a/kpartx/lopart.c
+++ b/kpartx/lopart.c
@@ -38,11 +38,10 @@
#define LOOP_CTL_GET_FREE 0x4C82
#endif
-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \
- && !defined (__s390x__)
-#define int2ptr(x) ((void *) ((int) x))
-#else
+#if defined (__LP64__)
#define int2ptr(x) ((void *) ((long) x))
+#else
+#define int2ptr(x) ((void *) ((int) x))
#endif
static char *
--
2.13.0
More information about the dm-devel
mailing list