diff options
author | jfarrell <jfarrell@apache.org> | 2014-01-06 22:51:22 -0500 |
---|---|---|
committer | jfarrell <jfarrell@apache.org> | 2014-01-06 22:51:22 -0500 |
commit | 05f37f1917bfa89d5862e4e45896bc6e28d8fa51 (patch) | |
tree | f71ac1ca13a44ad28fa96208ae223cecf8f8c7aa /lib/rb | |
parent | f1612825584e219ff02f601da6691eae67e0878f (diff) | |
download | thrift-05f37f1917bfa89d5862e4e45896bc6e28d8fa51.tar.gz |
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.
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 |