limine-install: Add O_BINARY flag to open() on win32

This commit is contained in:
mintsuki 2021-12-20 06:38:51 +01:00
parent a3890c9e60
commit d63149a652

View File

@ -10,6 +10,10 @@
#include <fcntl.h>
#include <unistd.h>
#ifndef O_BINARY
#define O_BINARY 0
#endif
#define DIV_ROUNDUP(a, b) (((a) + ((b) - 1)) / (b))
struct gpt_table_header {
@ -287,7 +291,7 @@ int main(int argc, char *argv[]) {
}
}
device = open(argv[1], O_RDWR);
device = open(argv[1], O_RDWR | O_BINARY);
if (device == -1) {
perror("ERROR");
goto cleanup;