From: jfarrell Date: Tue, 7 Jan 2014 03:51:22 +0000 (-0500) Subject: THRIFT-2219: Thrift gem fails to build on OS X Mavericks X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=05f37f1917bfa89d5862e4e45896bc6e28d8fa51;p=common%2Fthrift.git THRIFT-2219: Thrift gem fails to build on OS X Mavericks Client: ruby Patch: Jake Farrell Adds builtin check to strlcpy.h header for ruby lib. --- diff --git a/lib/rb/ext/strlcpy.h b/lib/rb/ext/strlcpy.h index c6f508f1..f6fe0fe6 100644 --- a/lib/rb/ext/strlcpy.h +++ b/lib/rb/ext/strlcpy.h @@ -17,14 +17,18 @@ * under the License. */ - #include #include +#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