From f81f8c68c7363d7ec03604dca8098d7e2034d050 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 11 Apr 2011 21:51:53 +1000 Subject: [PATCH] =?UTF-8?q?Fixes=20to=20make=20lrzip=20compile=20on=20cygw?= =?UTF-8?q?in=20courtesy=20of=20=D0=A2=D1=83=D0=BB=D0=B5=D0=B1=D0=B0=D0=B5?= =?UTF-8?q?=D0=B2=20=D0=A1=D0=B0=D0=BB=D0=B0=D0=B2=D0=B0=D1=82=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lrzip.c | 3 ++- lrzip_private.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lrzip.c b/lrzip.c index dd0998a..dce63af 100644 --- a/lrzip.c +++ b/lrzip.c @@ -509,7 +509,8 @@ static void release_hashes(rzip_control *control) { memset(control->salt_pass, 0, PASS_LEN); memset(control->hash, 0, SALT_LEN); - munlockall(); + munlock(control->salt_pass, PASS_LEN); + munlock(control->hash, HASH_LEN); free(control->salt_pass); free(control->hash); } diff --git a/lrzip_private.h b/lrzip_private.h index e04456b..492f3f8 100644 --- a/lrzip_private.h +++ b/lrzip_private.h @@ -90,7 +90,8 @@ typedef uint32_t u32; typedef struct rzip_control rzip_control; typedef struct md5_ctx md5_ctx; -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__APPLE__) || defined(__CYGWIN__) #define mremap fake_mremap #endif