diff --git a/include/squash.h b/include/squash.h index 2794c27..f061b38 100644 --- a/include/squash.h +++ b/include/squash.h @@ -232,9 +232,9 @@ int squash_scandir(sqfs *fs, const char *dirname, struct SQUASH_DIRENT ***nameli * The returned path is referenced by an internal cache and must not be freed. */ #ifdef _WIN32 -#define SQUASH_OS_PATH const wchar_t* +#define SQUASH_OS_PATH wchar_t* #else -#define SQUASH_OS_PATH const char* +#define SQUASH_OS_PATH char* #endif SQUASH_OS_PATH squash_tmpdir(); SQUASH_OS_PATH squash_tmpf(SQUASH_OS_PATH tmpdir, const char *ext_name); diff --git a/src/extract.c b/src/extract.c index 7a11fc7..e6843bb 100644 --- a/src/extract.c +++ b/src/extract.c @@ -238,7 +238,7 @@ static void squash_extract_cache_insert(sqfs *fs, const char *path, SQUASH_OS_PA SQUASH_OS_PATH squash_extract(sqfs *fs, const char *path, const char *ext_name) { SQUASH_OS_PATH ret; - static struct SquashExtractEntry* found; + static const struct SquashExtractEntry* found; found = squash_extract_cache_find(fs, path); if (NULL != found) {