From: Ramiro Polla Date: Wed, 22 Sep 2010 01:03:54 +0000 (-0300) Subject: Open files in binary mode X-Git-Tag: v3.2~322 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6fc46e5403dda15999d9464f91506675a64765ff;p=thirdparty%2Fccache.git Open files in binary mode --- diff --git a/util.c b/util.c index 39cf7ccd3..0ea67b4c2 100644 --- a/util.c +++ b/util.c @@ -1099,7 +1099,7 @@ read_file(const char *path, size_t size_hint, char **data, size_t *size) } size_hint = (size_hint < 1024) ? 1024 : size_hint; - fd = open(path, O_RDONLY); + fd = open(path, O_RDONLY | O_BINARY); if (fd == -1) { return false; }