diff --git a/repos/base-linux/lib/import/import-lx_hybrid.mk b/repos/base-linux/lib/import/import-lx_hybrid.mk index 9dfeecccaa..fd8fbc316b 100644 --- a/repos/base-linux/lib/import/import-lx_hybrid.mk +++ b/repos/base-linux/lib/import/import-lx_hybrid.mk @@ -109,3 +109,6 @@ LD_LIBGCC = # use the host c++ for linking to find shared libraries in DT_RPATH library paths LD_CMD = c++ + +# disable format-string security checks, which prevent non-literal format strings +CC_OPT += -Wno-format-security diff --git a/repos/os/src/server/lx_fs/file.h b/repos/os/src/server/lx_fs/file.h index 85d5e4a050..406fa455d3 100644 --- a/repos/os/src/server/lx_fs/file.h +++ b/repos/os/src/server/lx_fs/file.h @@ -129,7 +129,7 @@ class File_system::File : public Node void truncate(file_size_t size) { - ftruncate(_fd, size); + if (ftruncate(_fd, size)) /* nothing */; mark_as_updated(); }