From 51f6116e120149dc46f2cf8a1ae4b11a2b216656 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Tue, 25 Aug 2015 15:02:02 +0200 Subject: [PATCH] Hide symbols provided by bsd-compat functions by prefixing them by _sndio_. --- bsd-compat/bsd-compat.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/bsd-compat/bsd-compat.h b/bsd-compat/bsd-compat.h index 7c5d6c7..a969e07 100644 --- a/bsd-compat/bsd-compat.h +++ b/bsd-compat/bsd-compat.h @@ -1,14 +1,24 @@ #ifndef BSD_COMPAT_H #define BSD_COMPAT_H -/* - * XXX: these end up exported by libsndio, hide them to avoid possible - * collisions with program functions with the same name. - */ - +#ifndef HAVE_ISSETUGID +#define issetugid _sndio_issetugid int issetugid(void); +#endif + +#ifndef HAVE_STRLCAT +#define strlcat _sndio_strlcat size_t strlcat(char *, const char *, size_t); +#endif + +#ifndef HAVE_STRLCPY +#define strlcpy _sndio_strlcpy size_t strlcpy(char *, const char *, size_t); +#endif + +#ifndef HAVE_STRTONUM +#define strtonum _sndio_strtonum long long strtonum(const char *, long long, long long, const char **); +#endif #endif /* !defined(BSD_COMPAT_H) */