Thrift-1382: Bundle install doesnot work because thrift crashes
Client: ruby
Adding header for strlcpy.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1198503 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/strlcpy.c b/lib/rb/ext/strlcpy.c
index 3996950..6700ff2 100644
--- a/lib/rb/ext/strlcpy.c
+++ b/lib/rb/ext/strlcpy.c
@@ -17,11 +17,10 @@
* under the License.
*/
-#include <string.h>
+#include "strlcpy.h"
#ifndef HAVE_STRLCPY
#define HAVE_STRLCPY
-
size_t
strlcpy (char *dst, const char *src, size_t dst_sz)
{
@@ -38,7 +37,5 @@
*(dst - 1) = '\0';
return n + strlen (src);
}
-#else
-extern size_t strlcpy(char *, const char *, size_t);
#endif