diff options
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/world.c b/src/world.c index 916aa869..c3c3660f 100644 --- a/src/world.c +++ b/src/world.c @@ -4,6 +4,7 @@ #include "world.h" #include "serd_config.h" +#include "system.h" #if defined(USE_POSIX_FADVISE) # include <fcntl.h> @@ -13,18 +14,17 @@ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> FILE* serd_world_fopen(SerdWorld* world, const char* path, const char* mode) { FILE* fd = fopen(path, mode); if (!fd) { - serd_world_errorf(world, - SERD_BAD_STREAM, - "failed to open file %s (%s)\n", - path, - strerror(errno)); + char message[1024] = {0}; + serd_system_strerror(errno, message, sizeof(message)); + + serd_world_errorf( + world, SERD_BAD_STREAM, "failed to open file %s (%s)\n", path, message); return NULL; } |