Index: Makefile.in
--- Makefile.in.orig	2009-08-05 07:22:37 +0200
+++ Makefile.in	2009-08-05 19:15:14 +0200
@@ -781,7 +781,7 @@
 #
 lib_LTLIBRARIES = libarchive.la
 man_MANS = $(libarchive_man_MANS) $(bsdtar_man_MANS) $(bsdcpio_man_MANS)
-BUILT_SOURCES = libarchive/test/list.h tar/test/list.h cpio/test/list.h
+BUILT_SOURCES =
 TESTS_ENVIRONMENT = $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT)
 # Always build and test both bsdtar and bsdcpio as part of 'distcheck'
 DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
Index: cpio/cpio.c
--- cpio/cpio.c.orig	2009-07-22 07:15:09 +0200
+++ cpio/cpio.c	2009-08-05 19:15:14 +0200
@@ -29,6 +29,9 @@
 __FBSDID("$FreeBSD: src/usr.bin/cpio/cpio.c,v 1.15 2008/12/06 07:30:40 kientzle Exp $");
 
 #include <sys/types.h>
+#ifdef MAJOR_IN_MKDEV
+#   include <sys/mkdev.h>
+#endif
 #include <archive.h>
 #include <archive_entry.h>
 
@@ -72,6 +75,9 @@
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
 
 #include "cpio.h"
 #include "matching.h"
