Skip to content

Commit a585f77

Browse files
committed
[c89stringutils/c89stringutils_string_extras{.h,.c}] WiP FreeBSD and OpenBSD support
1 parent 4067155 commit a585f77

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

c89stringutils/c89stringutils_string_extras.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333

3434
#else
3535

36+
#ifdef ANY_BSD
37+
#define _vsnprintf vsnprintf
38+
#endif /* ANY_BSD */
39+
3640
inline int snprintf(char *buffer, size_t count, const char *format, ...) {
3741
int result;
3842
va_list args;

c89stringutils/c89stringutils_string_extras.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
1515
defined(__bsdi__) || defined(__DragonFly__) || defined(BSD)
1616
#define ANY_BSD
17+
#define __BSD_VISIBLE 1
1718
#endif
1819

1920
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)

0 commit comments

Comments
 (0)