]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Open files in binary mode
authorRamiro Polla <ramiro.polla@gmail.com>
Wed, 22 Sep 2010 01:03:54 +0000 (22:03 -0300)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 26 Sep 2010 20:10:15 +0000 (22:10 +0200)
util.c

diff --git a/util.c b/util.c
index 39cf7ccd3f02c092605fedfe6c4a242779f8ee4d..0ea67b4c234e873188c9bccf4634b821ee71057a 100644 (file)
--- 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;
        }