From 28a9dd72d6c5297f8a1442e23b80c165ba0b8486 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Tue, 30 Dec 2014 17:43:43 +0000 Subject: introduce uintptr_t in place of unsigned long, w7 64 bit requirement git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@625 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- src/sg_raw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/sg_raw.c') diff --git a/src/sg_raw.c b/src/sg_raw.c index 2580b080..90d4fc50 100644 --- a/src/sg_raw.c +++ b/src/sg_raw.c @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -27,7 +28,7 @@ #include "sg_lib.h" #include "sg_pt.h" -#define SG_RAW_VERSION "0.4.11 (2014-10-18)" +#define SG_RAW_VERSION "0.4.12 (2014-12-27)" #ifdef SG_LIB_WIN32 #ifndef HAVE_SYSCONF @@ -300,7 +301,7 @@ my_memalign(int length, unsigned char ** wrkBuffp) return NULL; } else if (wrkBuffp) *wrkBuffp = wrkBuff; - return (unsigned char *)(((unsigned long)wrkBuff + psz - 1) & + return (unsigned char *)(((uintptr_t)wrkBuff + psz - 1) & (~(psz - 1))); } #endif -- cgit v1.2.3