Add O_BINARY option to open file. (#753)

See issue #752.
pull/757/head
Jiri Bilek 2018-12-21 12:54:56 +01:00 zatwierdzone przez Jerry Jacobs
rodzic 0a2b7a4ff0
commit 358a91395d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1364,7 +1364,7 @@ int stlink_fread(stlink_t* sl, const char* path, bool is_ihex, stm32_addr_t addr
int error;
int fd = open(path, O_RDWR | O_TRUNC | O_CREAT, 00700);
int fd = open(path, O_RDWR | O_TRUNC | O_CREAT | O_BINARY, 00700);
if (fd == -1) {
fprintf(stderr, "open(%s) == -1\n", path);
return -1;