aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/chainboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/elflink/ldlinux/chainboot.c')
-rw-r--r--com32/elflink/ldlinux/chainboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/chainboot.c b/com32/elflink/ldlinux/chainboot.c
index ff19c530..27d4618c 100644
--- a/com32/elflink/ldlinux/chainboot.c
+++ b/com32/elflink/ldlinux/chainboot.c
@@ -15,6 +15,7 @@
* is BIOS-specific.
*/
+#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -53,7 +54,7 @@ void chainboot_file(const char *file, uint32_t type)
if (!buf)
goto bail;
- rv = open_file(file, &fd);
+ rv = open_file(file, O_RDONLY, &fd);
if (rv == -1)
goto bail;