DragonflyBSD compilation fixes

This commit is contained in:
SChernykh 2022-12-17 12:14:28 +01:00
parent 2ea37cdf37
commit 7d4d48e83b
5 changed files with 38 additions and 17 deletions

View file

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