diff options
| author | lin.sun <sunlin7@hotmail.com> | 2022-08-21 23:42:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-22 12:12:43 +0530 |
| commit | bea5ddb9fc234b48db6df3dcb66d75e76bec00c8 (patch) | |
| tree | 8b29bb5c40d5a083aaaf252eff068d86f76402bb /server/configure.ac | |
| parent | c3d227c11bbeb18ea494fa832d0f23f71ccf9a9d (diff) | |
synctex_parser: fix vasprintf() not exists in non-GNU environment (#134)
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 we build with clang:
```
./autogen.sh
./configure CC=clang
make
```
We 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) {
```
This change fixes the problem.
Diffstat (limited to 'server/configure.ac')
| -rw-r--r-- | server/configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/configure.ac b/server/configure.ac index 9a8c46d..efcc646 100644 --- a/server/configure.ac +++ b/server/configure.ac @@ -84,7 +84,7 @@ AC_C_BIGENDIAN # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_STRTOD -AC_CHECK_FUNCS([strcspn strtol getline]) +AC_CHECK_FUNCS([strcspn strtol getline vasprintf]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT |
