summaryrefslogtreecommitdiff
path: root/lib/sbuild/mntstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sbuild/mntstream.h')
-rw-r--r--lib/sbuild/mntstream.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/sbuild/mntstream.h b/lib/sbuild/mntstream.h
index a406d6ed..b1d27741 100644
--- a/lib/sbuild/mntstream.h
+++ b/lib/sbuild/mntstream.h
@@ -27,7 +27,14 @@
#include <stdio.h>
#include <sys/types.h>
-#include <mntent.h>
+
+#ifdef HAVE_MNTENT_H
+# include <mntent.h>
+#endif
+
+#ifdef HAVE_SYS_MNTTAB_H
+# include <sys/mnttab.h>
+#endif
namespace sbuild
{
@@ -68,12 +75,22 @@ namespace sbuild
mntentry ()
{};
+#ifdef HAVE_MNTENT
/**
* The contructor.
*
* @param entry the mntent structure to wrap.
*/
mntentry (const struct mntent& entry);
+#endif
+#ifdef HAVE_MNTTAB
+ /**
+ * The contructor.
+ *
+ * @param entry the mnttab structure to wrap.
+ */
+ mntentry (const struct mnttab& entry);
+#endif
/// Name of mounted filesystem.
std::string filesystem_name;