error: unknown type name ‘z_size_t’ from test/minigzip.c #772
Closed
Description
Hi Team,
I am pretty confused at this point, I saw z_size_t
was defined in the zconf.h and it's has been included in zlib.h
Looking for help what to do at this point.
From zconf.h
#ifdef Z_SOLO
typedef unsigned long z_size_t;
#else
# define z_longlong long long
# if defined(NO_SIZE_T)
typedef unsigned NO_SIZE_T z_size_t;
# elif defined(STDC)
# include <stddef.h>
typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif
# undef z_longlong
#endif
How to reproduce the error:
OS: PRETTY_NAME="CentOS Linux 7 (Core)"
Zlib version: zlib-1.2.13.tar
This error occurred on make
Error log:
[root@test ~/install-test/zlib-1.2.13]# make clean
rm -f *.o *.lo *~ \
example minigzip examplesh minigzipsh \
example64 minigzip64 \
infcover \
libz.* foo.gz so_locations \
_match.s maketree contrib/infback9/*.o
rm -rf objs
rm -f *.gcda *.gcno *.gcov
rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
[root@test ~/install-test/zlib-1.2.13]# make
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o adler32.o adler32.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o crc32.o crc32.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o deflate.o deflate.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o infback.o infback.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inffast.o inffast.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inflate.o inflate.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inftrees.o inftrees.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o trees.o trees.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o zutil.o zutil.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o compress.o compress.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o uncompr.o uncompr.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzclose.o gzclose.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzlib.o gzlib.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzread.o gzread.c
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L/usr/local/zlib/lib -L/usr/bin/openssl -L. libz.a
gcc -I/usr/local/zlib/include -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
test/minigzip.c: In function ‘file_uncompress’:
test/minigzip.c:503:5: error: unknown type name ‘z_size_t’
z_size_t len = strlen(file);
^
make: *** [minigzip.o] Error 1
[root@test ~/install-test/zlib-1.2.13]#
Let me know if any more details needed.
Thanks for the contributions.
Metadata
Assignees
Labels
No labels