diff --git a/libknet/compress_lzma_remap.h b/libknet/compress_lzma_remap.h index 9a13e7c7..780ebd53 100644 --- a/libknet/compress_lzma_remap.h +++ b/libknet/compress_lzma_remap.h @@ -1,12 +1,12 @@ #include "remap.h" -REMAP_PROTO(int,lzma_easy_buffer_encode, +REMAP_PROTO(LZMA_API(lzma_ret),lzma_easy_buffer_encode, (uint32_t preset, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)) -REMAP_PROTO(int,lzma_stream_buffer_decode, +REMAP_PROTO(LZMA_API(lzma_ret),lzma_stream_buffer_decode, (uint64_t *memlimit, uint32_t flags, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)) diff --git a/libknet/remap.h b/libknet/remap.h index e5583b14..87c1e679 100644 --- a/libknet/remap.h +++ b/libknet/remap.h @@ -1,25 +1,27 @@ /* Repeated inclusions define this differently */ #undef REMAP_PROTO #ifdef CANARY /* Canary uses fake prototype to make "calls" uniform */ #ifdef CANARY_CALL #define REMAP_PROTO(ret,name,args) name() + #else #define REMAP_PROTO(ret,name,args) char name(void); #endif /* CANARY_CALL */ #else #ifdef REMAP_FAIL #define REMAP_PROTO(ret,name,args) _int_ ## name = NULL; #else #ifdef REMAP_WITH #define REMAP_PROTO(ret,name,args) if (!(_int_ ## name = REMAP_WITH(#name))) goto fail; #else -#define REMAP_PROTO(ret,name,args) ret (*_int_ ## name)args; +/* Provide the plain prototype as well for validation */ +#define REMAP_PROTO(ret,name,args) ret (*_int_ ## name)args; \ + ret name args; #endif /* REMAP_WITH */ #endif /* REMAP_FAIL */ #endif /* CANARY */