From 5a5e604eac5cf7473c2d129b38b517dc1968c441 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 6 Jan 2025 21:19:38 -0600 Subject: Use GNU macro (v)asprintf only if _GNU_SOURCE is defined --- src/shared.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shared.h') diff --git a/src/shared.h b/src/shared.h index b10462e..684fb9f 100644 --- a/src/shared.h +++ b/src/shared.h @@ -15,4 +15,9 @@ void* xcalloc(size_t nmemb, size_t size); // `reallocarray()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XCALLOC_EXIT_ON_ERROR___` void* xreallocarray(void *ptr, size_t nmemb, size_t size); +#if !defined _GNU_SOURCE +int vasprintf(char **str, const char *format, va_list ap); +int asprintf(char **str, const char *format, ...); +#endif + #endif \ No newline at end of file -- cgit v1.2.3