From 37d4383f1806da8cb5788f7d590378e84b8578d0 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 1 Oct 2024 09:40:05 +0200 Subject: [PATCH] fix(userspace/libscap): fix build without `USE_ZLIB` macro. Signed-off-by: Federico Di Pierro --- userspace/libscap/scap_zlib.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/userspace/libscap/scap_zlib.h b/userspace/libscap/scap_zlib.h index 94751b3504..9af67d29ac 100644 --- a/userspace/libscap/scap_zlib.h +++ b/userspace/libscap/scap_zlib.h @@ -27,6 +27,10 @@ limitations under the License. #include #else #include + +#define Z_OK 0 +#define Z_BUF_ERROR 1 + #define gzFile FILE* #define gzflush(X, Y) fflush(X) #define gzopen fopen @@ -36,9 +40,11 @@ limitations under the License. #define gzwrite(F, B, S) fwrite(B, 1, S, F) #define gzread(F, B, S) fread(B, 1, S, F) #define gztell(F) ftell(F) +#define gzclearerr(F) clearerr(F) inline static const char *gzerror(FILE *F, int *E) { *E = ferror(F); return "error reading file descriptor"; } + #define gzseek fseek #endif