mirror of
https://github.com/acpica/acpica/
synced 2025-01-13 12:59:18 +03:00
AcpiDump: Update for FreeBSD support only.
Adds some conditional compiles required for FreeBSD support.
This commit is contained in:
parent
08093adb7c
commit
99779c83f4
@ -116,6 +116,9 @@
|
||||
#include "acpidump.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#ifdef _FreeBSD
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#define _COMPONENT ACPI_OS_SERVICES
|
||||
ACPI_MODULE_NAME ("osunixmap")
|
||||
@ -125,6 +128,12 @@
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#ifdef _FreeBSD
|
||||
#define MMAP_FLAGS MAP_SHARED
|
||||
#else
|
||||
#define MMAP_FLAGS MAP_PRIVATE
|
||||
#endif
|
||||
|
||||
#define SYSTEM_MEMORY "/dev/mem"
|
||||
|
||||
|
||||
@ -191,7 +200,7 @@ AcpiOsMapMemory (
|
||||
|
||||
/* Map the table header to get the length of the full table */
|
||||
|
||||
MappedMemory = mmap (NULL, (Length + Offset), PROT_READ, MAP_PRIVATE,
|
||||
MappedMemory = mmap (NULL, (Length + Offset), PROT_READ, MMAP_FLAGS,
|
||||
fd, (Where - Offset));
|
||||
if (MappedMemory == MAP_FAILED)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user