[Box Backup-commit] COMMIT r2190 - box/trunk/lib/common

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Thu, 29 May 2008 22:51:38 +0100 (BST)


Author: martin
Date: 2008-05-29 22:51:38 +0100 (Thu, 29 May 2008)
New Revision: 2190

Modified:
   box/trunk/lib/common/Logging.h
Log:
Fix strerror include. Needed for gcc 4.3

Modified: box/trunk/lib/common/Logging.h
===================================================================
--- box/trunk/lib/common/Logging.h	2008-05-29 21:51:00 UTC (rev 2189)
+++ box/trunk/lib/common/Logging.h	2008-05-29 21:51:38 UTC (rev 2190)
@@ -10,6 +10,7 @@
 #ifndef LOGGING__H
 #define LOGGING__H
 
+#include <cstring>
 #include <iomanip>
 #include <sstream>
 #include <vector>
@@ -49,11 +50,11 @@
 	{ BOX_LOG(Log::TRACE, stuff) }
 
 #define BOX_LOG_SYS_WARNING(stuff) \
-	BOX_WARNING(stuff << ": " << strerror(errno) << " (" << errno << ")")
+	BOX_WARNING(stuff << ": " << std::strerror(errno) << " (" << errno << ")")
 #define BOX_LOG_SYS_ERROR(stuff) \
-	BOX_ERROR(stuff << ": " << strerror(errno) << " (" << errno << ")")
+	BOX_ERROR(stuff << ": " << std::strerror(errno) << " (" << errno << ")")
 #define BOX_LOG_SYS_FATAL(stuff) \
-	BOX_FATAL(stuff << ": " << strerror(errno) << " (" << errno << ")")
+	BOX_FATAL(stuff << ": " << std::strerror(errno) << " (" << errno << ")")
 
 #ifdef WIN32
 	#define BOX_LOG_WIN_ERROR(stuff) \