Commit 5e4ec0b2 authored by Kenton Varda's avatar Kenton Varda

Fix some recent bugs.

parent 6d346575
......@@ -61,7 +61,7 @@ capnpc_middleman:
$(capnpc_outputs): capnpc_middleman
includecapnpdir = $(includedir)/capnproto
includekjdir = $(includedir)/capnproto
includekjdir = $(includedir)/kj
includekj_HEADERS = \
src/kj/common.h \
......
......@@ -129,9 +129,11 @@ static String makeDescription(DescriptionStyle style, const char* code, int erro
sysErrorArray = strerror_r(errorNumber, buffer, sizeof(buffer));
}
#else
// TODO(port): Other unixes should have strerror_r but it may have a different signature.
// Port for thread-safety.
sysErrorArray = arrayPtr(strerror(errorNumber));
char buffer[256];
if (style == SYSCALL) {
strerror_r(errorNumber, buffer, sizeof(buffer));
sysErrorArray = buffer;
}
#endif
size_t totalSize = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment