limine-install: Add O_BINARY flag to open() on win32
This commit is contained in:
parent
a3890c9e60
commit
d63149a652
@ -10,6 +10,10 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifndef O_BINARY
|
||||||
|
#define O_BINARY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DIV_ROUNDUP(a, b) (((a) + ((b) - 1)) / (b))
|
#define DIV_ROUNDUP(a, b) (((a) + ((b) - 1)) / (b))
|
||||||
|
|
||||||
struct gpt_table_header {
|
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) {
|
if (device == -1) {
|
||||||
perror("ERROR");
|
perror("ERROR");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user