summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar/bsdtar_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tar/bsdtar_platform.h')
-rw-r--r--usr.bin/tar/bsdtar_platform.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index e74e25a..f8b3d2c 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -112,8 +112,14 @@
#define __FBSDID(a) /* null */
#endif
-#ifndef HAVE_LIBARCHIVE
-#error Configuration error: did not find libarchive.
+#ifdef HAVE_LIBARCHIVE
+/* If we're using the platform libarchive, include system headers. */
+#include <archive.h>
+#include <archive_entry.h>
+#else
+/* Otherwise, include user headers. */
+#include "archive.h"
+#include "archive_entry.h"
#endif
/*
OpenPOWER on IntegriCloud