X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=linux%2Fppp_deflate.c;fp=linux%2Fppp_deflate.c;h=3de45971c6fbe70bf288740242d705afd4de16d0;hp=fe3831985a35b1686efe7a6473eea8e80a8a4abb;hb=1d80f42e7fee2db352e176d52219bf42e11d2eb4;hpb=3a3fd3cfbbceef645c020603a7cfcbd64b46bc4a diff --git a/linux/ppp_deflate.c b/linux/ppp_deflate.c index fe38319..3de4597 100644 --- a/linux/ppp_deflate.c +++ b/linux/ppp_deflate.c @@ -1,5 +1,5 @@ /* - * ==FILEVERSION 970428== + * ==FILEVERSION 970522== * * ppp_deflate.c - interface the zlib procedures for Deflate compression * and decompression (as used by gzip) to the PPP code. @@ -32,7 +32,7 @@ */ #include - +#include #include #include #include @@ -42,7 +42,15 @@ #include #include #include + +#undef VERSION +/* a nice define to generate linux version numbers */ +#define VERSION(major,minor,patch) (((((major)<<8)+(minor))<<8)+(patch)) + +#if LINUX_VERSION_CODE >= VERSION(2,1,4) #include +#endif + #include #include /* to get the struct task_struct */ #include /* used in new tty drivers */ @@ -201,7 +209,7 @@ z_comp_alloc(options, opt_len) memset (state, 0, sizeof (struct ppp_deflate_state)); state->strm.next_in = NULL; state->strm.zalloc = zalloc; - state->strm.zalloc_init = zalloc; + state->strm.zalloc_init = zalloc_init; state->strm.zfree = zfree; state->w_size = w_size; @@ -386,6 +394,7 @@ z_decomp_alloc(options, opt_len) state->w_size = w_size; state->strm.next_out = NULL; state->strm.zalloc = zalloc; + state->strm.zalloc_init = zalloc_init; state->strm.zfree = zfree; if (inflateInit2(&state->strm, -w_size) != Z_OK) {