about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/types.hh1
-rw-r--r--src/libutil/util.cc1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/types.hh b/src/libutil/types.hh
index 257871a82b35..513aae0392bc 100644
--- a/src/libutil/types.hh
+++ b/src/libutil/types.hh
@@ -34,6 +34,7 @@ public:
 class SysError : public Error
 {
 public:
+    int errNo;
     SysError(const format & f);
 };
 
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 08385e5d96e0..ae5fe821e78b 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -35,6 +35,7 @@ Error & Error::addPrefix(const format & f)
 
 SysError::SysError(const format & f)
     : Error(format("%1%: %2%") % f.str() % strerror(errno))
+    , errNo(errno)
 {
 }