Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: include/dbus-c++/eventloop-integration.h

Issue 1648006: Apply patch from ebuild file to fix toString (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/echo/echo-client.cpp ('k') | src/error.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/dbus-c++/eventloop-integration.h
diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h
index fd56c6ebd7224191810126bcd9aea0f822a62285..a1c64f4262daca044e70b6dcba6b3e5e619d9983 100644
--- a/include/dbus-c++/eventloop-integration.h
+++ b/include/dbus-c++/eventloop-integration.h
@@ -26,6 +26,7 @@
#define __DBUSXX_EVENTLOOP_INTEGRATION_H
#include <errno.h>
+#include <string.h>
#include "api.h"
#include "dispatcher.h"
#include "util.h"
@@ -68,8 +69,12 @@ public:
//pipe to create a new fd used to unlock a dispatcher at any
// moment (used by leave function)
int ret = pipe(_pipe);
- if (ret == -1) throw Error("PipeError:errno", toString(errno).c_str());
-
+ if (ret == -1) {
+ char buffer[128]; // buffer copied in Error constructor
+ throw Error("PipeError:errno", strerror_r(errno,
+ buffer,
+ sizeof(buffer)));
+ }
_fdunlock[0] = _pipe[0];
_fdunlock[1] = _pipe[1];
« no previous file with comments | « examples/echo/echo-client.cpp ('k') | src/error.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698