Added ifdefs for DragonflyBSD

Possible fix for #3179
This commit is contained in:
SChernykh 2022-12-16 15:26:37 +01:00
parent 25decd1b7f
commit a02afe6d4f
4 changed files with 10 additions and 10 deletions

View file

@ -31,7 +31,7 @@
#include <unistd.h>
#include <cstdio>
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__DragonFly__)
# include <kenv.h>
#endif
@ -288,7 +288,7 @@ static off_t address_from_efi()
const char *filename;
char linebuf[64];
off_t address = 0;
# elif defined(__FreeBSD__)
# elif defined(__FreeBSD__) || defined(__DragonFly__)
char addrstr[KENV_MVALLEN + 1];
# endif
@ -310,7 +310,7 @@ static off_t address_from_efi()
fclose(efi_systab);
return address;
# elif defined(__FreeBSD__)
# elif defined(__FreeBSD__) || defined(__DragonFly__)
if (kenv(KENV_GET, "hint.smbios.0.mem", addrstr, sizeof(addrstr)) == -1) {
return EFI_NOT_FOUND;
}