diff -urN cpio-2.10/configure.ac cpio-2.10-haiku/configure.ac
--- cpio-2.10/configure.ac	2009-06-20 08:28:11.000000000 +0000
+++ cpio-2.10-haiku/configure.ac	2009-10-19 00:10:13.000000000 +0000
@@ -44,6 +44,8 @@
 AC_HEADER_STDC
 AC_HEADER_DIRENT
 
+AC_SEARCH_LIBS(gethostbyname, [socket, network])
+
 AC_CHECK_FUNCS([fchmod fchown])
 # This is needed for mingw build
 AC_CHECK_FUNCS([setmode getpwuid getpwnam getgrgid getgrnam pipe fork getuid geteuid])
diff -urN cpio-2.10/gnu/hash.c cpio-2.10-haiku/gnu/hash.c
--- cpio-2.10/gnu/hash.c	2009-06-19 09:11:54.000000000 +0000
+++ cpio-2.10-haiku/gnu/hash.c	2009-10-19 00:32:02.000000000 +0000
@@ -491,6 +491,7 @@
 check_tuning (Hash_table *table)
 {
   const Hash_tuning *tuning = table->tuning;
+  float epsilon = 0.1f;
   if (tuning == &default_tuning)
     return true;
 
@@ -499,7 +500,6 @@
      fail to grow or shrink as they should.  The smallest allocation
      is 11 (due to next_prime's algorithm), so an epsilon of 0.1
      should be good enough.  */
-  float epsilon = 0.1f;
 
   if (epsilon < tuning->growth_threshold
       && tuning->growth_threshold < 1 - epsilon
--- cpio-2.10/src/makepath.c	2009-10-19 00:45:54.000000000 +0000
+++ cpio-2.10-haiku/src/makepath.c	2009-02-14 18:15:50.000000000 +0000
@@ -56,6 +56,7 @@
   char *dirpath;		/* A copy we can scribble NULs on.  */
   struct stat stats;
   int retval = 0;
+  char *slash;
   mode_t tmpmode;
   mode_t invert_permissions;
   int we_are_root = getuid () == 0;
@@ -68,7 +69,7 @@
       tmpmode = MODE_RWX & ~ newdir_umask;
       invert_permissions = we_are_root ? 0 : MODE_WXUSR & ~ tmpmode;
 
-      char *slash = dirpath;
+      slash = dirpath;
       while (*slash == '/')
 	slash++;
       while ((slash = strchr (slash, '/')))
