diff options
Diffstat (limited to 'lib/rb')
-rw-r--r-- | lib/rb/ext/strlcpy.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/rb/ext/strlcpy.h b/lib/rb/ext/strlcpy.h index c6f508f13..f6fe0fe6b 100644 --- a/lib/rb/ext/strlcpy.h +++ b/lib/rb/ext/strlcpy.h @@ -17,14 +17,18 @@ * under the License. */ - #include <sys/types.h> #include <string.h> +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + #ifndef HAVE_STRLCPY -size_t -strlcpy (char *dst, const char *src, size_t dst_sz); +size_t strlcpy (char *dst, const char *src, size_t dst_sz); #else +#if !__has_builtin(strlcpy) extern size_t strlcpy(char *, const char *, size_t); #endif +#endif |