X-Git-Url: https://git.sven.stormbind.net/?p=sven%2Fexfat-utils.git;a=blobdiff_plain;f=libexfat%2Fio.c;h=bae0cf15a1412dfdac2c67b4085d35aa56361bc6;hp=63ccfdbfdf9cc02e21cda76f38840bbdf9a7d751;hb=refs%2Ftags%2Fupstream%2F1.2.8;hpb=3639f26edacd0198b1d3e4834000a88b6a43612c diff --git a/libexfat/io.c b/libexfat/io.c index 63ccfdb..bae0cf1 100644 --- a/libexfat/io.c +++ b/libexfat/io.c @@ -3,7 +3,7 @@ exFAT file system implementation library. Free exFAT implementation. - Copyright (C) 2010-2017 Andrew Nayenko + Copyright (C) 2010-2018 Andrew Nayenko This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,8 +35,9 @@ #include #include #include -#endif +#elif __linux__ #include +#endif struct exfat_dev { @@ -84,7 +85,7 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) started with stdin (0), stdout (1) or stderr (2) closed, the system will give us descriptor 0, 1 or 2 later when we open block device, FUSE communication pipe, etc. As a result, functions using stdin, - stdout or stderr will actualy work with a different thing and can + stdout or stderr will actually work with a different thing and can corrupt it. Protect descriptors 0, 1 and 2 from such misuse. */ while (!is_open(STDIN_FILENO) || !is_open(STDOUT_FILENO)