summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hscript/disk.cc2
-rw-r--r--hscript/network.cc3
2 files changed, 5 insertions, 0 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc
index 9d700dd..5d3112f 100644
--- a/hscript/disk.cc
+++ b/hscript/disk.cc
@@ -47,6 +47,7 @@ bool DiskId::validate(ScriptOptions options) const {
/* We only validate if running in an Installation Environment. */
if(!options.test(InstallEnvironment)) return true;
+#ifdef HAS_INSTALL_ENV
/* Unlike 'mount', 'diskid' *does* require that the block device exist
* before installation begins. This test is always valid. */
struct stat blk_stat;
@@ -62,6 +63,7 @@ bool DiskId::validate(ScriptOptions options) const {
"diskid: " + _block + " is not a valid block device");
return false;
}
+#endif /* HAS_INSTALL_ENV */
return true;
}
diff --git a/hscript/network.cc b/hscript/network.cc
index 03c5a03..27e8a9e 100644
--- a/hscript/network.cc
+++ b/hscript/network.cc
@@ -17,6 +17,9 @@
# include <string.h> /* strerror */
# include <sys/ioctl.h> /* ioctl, ioctl numbers */
# include <unistd.h> /* close */
+#else
+/*! The size of Linux interface names. */
+# define IFNAMSIZ 16
#endif
#include "network.hh"
#include "util/output.hh"