diff --git a/src/detection/bios/bios_windows.c b/src/detection/bios/bios_windows.c index 1e22b9a6b..d9bc16dd3 100644 --- a/src/detection/bios/bios_windows.c +++ b/src/detection/bios/bios_windows.c @@ -27,6 +27,11 @@ typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION }; }; } SYSTEM_BOOT_ENVIRONMENT_INFORMATION; +#elif __OpenBSD__ +#include "common/io/io.h" + +#include +#include #endif typedef struct FFSmbiosBios @@ -89,9 +94,12 @@ const char* ffDetectBios(FFBiosResult* bios) default: break; } } - #elif __HAIKU__ || __OpenBSD__ + #elif __HAIKU__ // Currently SMBIOS detection is supported in legency BIOS only ffStrbufSetStatic(&bios->type, "BIOS"); + #elif __OpenBSD__ + FF_AUTO_CLOSE_FD int fd = open("/dev/efi", O_RDONLY); + ffStrbufSetStatic(&bios->type, fd >= 0 ? "UEFI" : "BIOS"); #endif return NULL;