pdf-tools
pdf-tools copied to clipboard
synctex_parser: fix vasprintf() not exists in non-GNU environment
The vasprintf() is a GNU extension function, missed in non-GNU build environment, so we define it.
Without this change, there will have error message when build with clang:
./autogen.sh
./configure CC=clang
make
Will get errors:
synctex_parser.c:8448:13: error: call to undeclared function 'vasprintf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (vasprintf(&buffer, format, va) < 0) {