Fixes to make lrzip compile on cygwin courtesy of Тулебаев Салават .

This commit is contained in:
Con Kolivas 2011-04-11 21:51:53 +10:00
parent 920ad9251d
commit f81f8c68c7
2 changed files with 4 additions and 2 deletions

View file

@ -509,7 +509,8 @@ static void release_hashes(rzip_control *control)
{ {
memset(control->salt_pass, 0, PASS_LEN); memset(control->salt_pass, 0, PASS_LEN);
memset(control->hash, 0, SALT_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->salt_pass);
free(control->hash); free(control->hash);
} }

View file

@ -90,7 +90,8 @@ typedef uint32_t u32;
typedef struct rzip_control rzip_control; typedef struct rzip_control rzip_control;
typedef struct md5_ctx md5_ctx; 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 #define mremap fake_mremap
#endif #endif