openbsd-ports/www/cclive/patches/patch-src_cc_error_h
2015-06-29 07:14:10 +00:00

34 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_cc_error_h,v 1.2 2015/06/29 07:14:10 jasper Exp $
- XXX ./cc/error.h:42: error: invalid conversion from 'int' to 'const char*
XSI versus GNU implementation.
- Add explicit <iostream> includes, fixes build with Boost 1.56
https://github.com/legatvs/cclive/pull/2
--- src/cc/error.h.orig Sun Jun 28 21:43:19 2015
+++ src/cc/error.h Sun Jun 28 21:43:12 2015
@@ -28,6 +28,7 @@
#include <boost/exception/get_error_info.hpp>
#include <boost/exception/errinfo_errno.hpp>
#include <boost/tuple/tuple.hpp>
+#include <iostream>
#include <cerrno>
namespace cc
@@ -36,13 +37,13 @@ namespace cc
namespace error
{
-static inline std::string strerror(const int ec)
+static inline int strerror(const int ec)
{
char buf[256];
return strerror_r(ec, buf, sizeof(buf));
}
-static inline std::string strerror() { return strerror(errno); }
+static inline int strerror() { return strerror(errno); }
typedef boost::tuple<std::string,std::string> type_tuple;
typedef boost::error_info<struct tag_tuple,type_tuple> errinfo_tuple;