summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hscript/meta.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc
index e3d05f2..af72eaf 100644
--- a/hscript/meta.cc
+++ b/hscript/meta.cc
@@ -10,12 +10,13 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-#include <assert.h>
+#include <cassert>
#include <fstream>
#include <regex>
#include <set>
#include <sstream>
#ifdef HAS_INSTALL_ENV
+# include <cstring>
# include <sys/mount.h>
# include "util/filesystem.hh"
#endif /* HAS_INSTALL_ENV */
@@ -625,7 +626,7 @@ Key *SvcEnable::parseFromData(const std::string &data,
const ScriptLocation &pos, int *errors, int *,
const Script *script) {
const static std::string valid_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890.-_";
- std::string::size_type space = data.find_first_of(' ');;
+ std::string::size_type space = data.find_first_of(' ');
std::string svc, runlevel{"default"};
if(space != std::string::npos) {
@@ -849,7 +850,7 @@ bool Bootloader::execute() const {
if(mount("efivarfs", efipath.c_str(), "efivarfs", MS_NOEXEC |
MS_NODEV | MS_NOSUID | MS_RELATIME, nullptr) != 0) {
output_error(pos, "bootloader: failed to mount writable efivarfs",
- strerror(errno));
+ ::strerror(errno));
return false;
}