Skip to content

Commit

Permalink
Include stdio.h for vsnprintf in buffer.h (#693)
Browse files Browse the repository at this point in the history
`vsnprintf` is defined in `stdio.h`:
https://github.com/bminor/glibc/blob/734e7f91e752f44984fe42c2384c23a0290b6e56/libio/stdio.h#L389

All the examples include both `stdio.h` and `stdarg.h` when using `vsnprintf`.
For whatever reason, on the emscripten target there is an error due to missing
`vsnprintf` but on other targets there is no error.
  • Loading branch information
hoodmane authored Aug 21, 2024
1 parent 67316eb commit 517f3ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <string.h>
#include <stdarg.h>
#include <stdio.h> // vsnprintf

NAMESPACE_BEGIN(NB_NAMESPACE)
NAMESPACE_BEGIN(detail)
Expand Down

0 comments on commit 517f3ee

Please sign in to comment.