The former is not using any declarations from tarfn.h, but the latter is.
@@ -23,6 +23,8 @@
#include <stdbool.h>
+#include <dpkg/tarfn.h>
+
struct tarcontext {
int backendpipe;
struct pkginfo *pkg;
@@ -37,7 +37,6 @@
#include <dpkg/i18n.h>
#include <dpkg/dpkg.h>
#include <dpkg/dpkg-db.h>
-#include <dpkg/tarfn.h>
#include <dpkg/myopt.h>
#include "filesdb.h"