aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reader.c2
-rw-r--r--src/serdi.c2
-rw-r--r--tests/serd_test.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/reader.c b/src/reader.c
index 36d01cae..d2e10f69 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1837,7 +1837,7 @@ serd_reader_read_file(SerdReader* reader,
return SERD_ERR_BAD_ARG;
}
- FILE* fd = serd_fopen((const char*)path, "r");
+ FILE* fd = serd_fopen((const char*)path, "rb");
if (!fd) {
free(path);
return SERD_ERR_UNKNOWN;
diff --git a/src/serdi.c b/src/serdi.c
index 9624e29c..16767ffd 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -204,7 +204,7 @@ main(int argc, char** argv)
in_name = in_name ? in_name : input;
if (!in_fd) {
input = serd_uri_to_path(in_name);
- if (!input || !(in_fd = serd_fopen((const char*)input, "r"))) {
+ if (!input || !(in_fd = serd_fopen((const char*)input, "rb"))) {
return 1;
}
}
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 33f78fcd..b80c8b82 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -484,7 +484,7 @@ main(void)
// Test SerdReader and SerdWriter
const char* path = "serd_test.ttl";
- FILE* fd = fopen(path, "w");
+ FILE* fd = fopen(path, "wb");
if (!fd) {
FAILF("Failed to open file %s\n", path);
}