THRIFT-664. rb: Ruby extension fails to build with Ruby 1.9.1

This change takes care of the 1.9 build issues and a few other c-extension niceties.

Patch: Rajesh Malepati

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984524 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/ext/struct.c b/lib/rb/ext/struct.c
index c253591..db78efa 100644
--- a/lib/rb/ext/struct.c
+++ b/lib/rb/ext/struct.c
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#include <struct.h>
-#include <constants.h>
+#include "struct.h"
+#include "constants.h"
 #include "macros.h"
 
 #ifndef HAVE_STRLCPY
@@ -40,7 +40,12 @@
       *(dst - 1) = '\0';
     return n + strlen (src);
 }
-
+#else
+/*
+   Ruby 1.9.x includes the OpenBSD implementation of strlcpy.
+   See missing/strlcpy.c in Ruby 1.9 source
+ */
+extern size_t strlcpy(char *, const char *, size_t);
 #endif
 
 VALUE thrift_union_class;