From 638ccde1fb47220b50de479dcf9f4273516e83d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Mon, 5 Dec 2016 10:45:13 +0100
Subject: [PATCH] daemon: Fix invalid Boost format string.

* nix/libstore/optimise-store.cc (LocalStore::optimisePath_): Use %3%
instead of %m, the latter being an invalid Boost format specifier.
---
 nix/libstore/optimise-store.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nix/libstore/optimise-store.cc b/nix/libstore/optimise-store.cc
index 565c62ca83c..9bed371c70e 100644
--- a/nix/libstore/optimise-store.cc
+++ b/nix/libstore/optimise-store.cc
@@ -5,6 +5,7 @@
 #include "globals.hh"
 
 #include <cstdlib>
+#include <cstring>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -159,7 +160,8 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa
 	    /* On ext4, that probably means the directory index is full.  When
 	       that happens, it's fine to ignore it: we just effectively
 	       disable deduplication of this file.  */
-	    printMsg(lvlInfo, format("cannot link `%1%' to `%2%': %m") % linkPath % path);
+	    printMsg(lvlInfo, format("cannot link `%1%' to `%2%': %3%")
+		     % linkPath % path % strerror(ENOSPC));
 	    return;
 
 	default:
-- 
GitLab