Project import generated by Copybara.
NOKEYCHECK=True
GitOrigin-RevId: 75eb551bb476292778f8ff80503c35210a328d52
diff --git a/dpkg.patches/dpkg-01.patch b/dpkg.patches/dpkg-01.patch
new file mode 100644
index 0000000..853d68d
--- /dev/null
+++ b/dpkg.patches/dpkg-01.patch
@@ -0,0 +1,80 @@
+diff -aruN a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
+--- a/utils/start-stop-daemon.c 2011-10-11 22:56:12.000000000 -0700
++++ b/utils/start-stop-daemon.c 2015-11-24 10:37:17.354279923 -0800
+@@ -79,6 +79,7 @@
+
+ #include <sys/types.h>
+ #include <sys/time.h>
++#include <time.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/termios.h>
+@@ -288,8 +289,16 @@
+ static void
+ xgettimeofday(struct timeval *tv)
+ {
+- if (gettimeofday(tv, NULL) != 0)
++ struct timespec tp;
++ if (clock_gettime(CLOCK_MONOTONIC, &tp))
+ fatal("gettimeofday failed");
++
++ /*
++ * Convert from timespec to timeval
++ * We do not care about microseconds, set to 0
++ */
++ tv->tv_sec = tp.tv_sec;
++ tv->tv_usec = 0;
+ }
+
+ static void
+diff -aruN a/configure b/configure
+--- a/configure 2011-10-13 22:09:45.000000000 -0700
++++ b/configure 2015-11-24 14:33:53.319638762 -0800
+@@ -9350,6 +9350,46 @@
+ SSD_LIBS="${SSD_LIBS:+$SSD_LIBS }-lihash"
+ fi
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
++$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
++if ${ac_cv_lib_rt_clock_gettime+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrt $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char clock_gettime ();
++int
++main ()
++{
++return clock_gettime ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_rt_clock_gettime=yes
++else
++ ac_cv_lib_rt_clock_gettime=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
++$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
++if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
++ SSD_LIBS="${SSD_LIBS:+$SSD_LIBS }-lrt"
++fi
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proc_stat_list_create in -lps" >&5
+ $as_echo_n "checking for proc_stat_list_create in -lps... " >&6; }
+ if ${ac_cv_lib_ps_proc_stat_list_create+:} false; then :
+
diff --git a/dpkg.tar.bz2 b/dpkg.tar.bz2
new file mode 100644
index 0000000..6e1ec0f
--- /dev/null
+++ b/dpkg.tar.bz2
Binary files differ
diff --git a/dpkg.url b/dpkg.url
new file mode 100644
index 0000000..4f74d70
--- /dev/null
+++ b/dpkg.url
@@ -0,0 +1 @@
+http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_1.16.1.1.tar.bz2
diff --git a/dpkg.version b/dpkg.version
new file mode 100644
index 0000000..3407906
--- /dev/null
+++ b/dpkg.version
@@ -0,0 +1 @@
+1.16.1.1