pdf-tools icon indicating copy to clipboard operation
pdf-tools copied to clipboard

synctex_parser: fix vasprintf() not exists in non-GNU environment

Open sunlin7 opened this issue 3 years ago • 0 comments

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) {

sunlin7 avatar Jul 28 '22 19:07 sunlin7