aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index 9c076c11..ced64adc 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -8,6 +8,7 @@
#include "sink.h"
#include "stack.h"
#include "string_utils.h"
+#include "system.h"
#include "try.h"
#include "uri_utils.h"
#include "world.h"
@@ -257,7 +258,9 @@ sink(const void* buf, size_t len, SerdWriter* writer)
const size_t written = serd_byte_sink_write(buf, len, &writer->byte_sink);
if (written != len) {
if (errno) {
- const char* const message = strerror(errno);
+ char message[1024] = {0};
+ serd_system_strerror(errno, message, sizeof(message));
+
w_err(writer, SERD_BAD_WRITE, "write error (%s)\n", message);
} else {
w_err(writer, SERD_BAD_WRITE, "write error\n");