Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(userspace/libscap): fix build without USE_ZLIB macro. #2089

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions userspace/libscap/scap_zlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ limitations under the License.
#include <zlib.h>
#else
#include <stdio.h>

#define Z_OK 0
#define Z_BUF_ERROR 1

#define gzFile FILE*
#define gzflush(X, Y) fflush(X)
#define gzopen fopen
Expand All @@ -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
Loading