From 8144dedfef55db5d7f756e8e8c17a00f4e43b56f Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 25 Nov 2017 14:21:02 +0300 Subject: [PATCH 2/3] fix 'strndup shadows a built-in function' warnings: if strndup() is not available, the build log is plagued with the following warnings: lib/driver/cdio_private.h:46:21: warning: declaration of 'strndup' shadows a built-in function So, rename the replacement inline strndup to libcdio_strdup, and define strndup as libcdio_strndup. --- lib/driver/cdio_private.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/driver/cdio_private.h b/lib/driver/cdio_private.h index 717c188..0480c31 100644 --- a/lib/driver/cdio_private.h +++ b/lib/driver/cdio_private.h @@ -43,7 +43,9 @@ extern "C" { #endif /* __cplusplus */ #ifndef HAVE_STRNDUP -static inline char *strndup(const char *s, size_t n) +#undef strndup +#define strndup libcdio_strndup +static inline char *libcdio_strndup(const char *s, size_t n) { char *result; size_t len = strlen (s); -- 1.8.5.5