librazor/razor.c
changeset 345 edd9b0fa63ca
parent 334 52871d4b9265
child 351 48b0adfe3059
     1.1 --- a/librazor/razor.c	Thu Jan 08 16:54:05 2009 +0000
     1.2 +++ b/librazor/razor.c	Mon Jan 12 17:54:13 2009 +0000
     1.3 @@ -39,6 +39,10 @@
     1.4  #include "razor-internal.h"
     1.5  #include "razor.h"
     1.6  
     1.7 +#ifndef O_BINARY
     1.8 +#define O_BINARY	0
     1.9 +#endif
    1.10 +
    1.11  void *
    1.12  zalloc(size_t size)
    1.13  {
    1.14 @@ -283,7 +287,7 @@
    1.15  {
    1.16  	int fd, status;
    1.17  
    1.18 -	fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666);
    1.19 +	fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0666);
    1.20  	if (fd < 0)
    1.21  		return -1;
    1.22