summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaket Dumbre <97769119+sacdintel@users.noreply.github.com>2023-03-22 15:37:53 -0700
committerGitHub <noreply@github.com>2023-03-22 15:37:53 -0700
commitb93300b237825e1e12e13052a6067a6bf22ab429 (patch)
tree9340d5a0b3040b710da72b14d55c702c3a68d8d4
parent76bfedddb407aa35fec4c018381e476db27544c3 (diff)
parent2411e11ef88f42b08f33c38ed9c0d40282780e8c (diff)
downloadacpica-b93300b237825e1e12e13052a6067a6bf22ab429.tar.gz
Merge pull request #846 from tamird/ub-linux-nonkernel
Avoid undefined behavior: member access within null pointer
-rw-r--r--source/include/platform/aclinux.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
index 9035389d2..da37a2fad 100644
--- a/source/include/platform/aclinux.h
+++ b/source/include/platform/aclinux.h
@@ -310,7 +310,10 @@
#define ACPI_USE_STANDARD_HEADERS
#ifdef ACPI_USE_STANDARD_HEADERS
+#include <stddef.h>
#include <unistd.h>
+
+#define ACPI_OFFSET(d, f) offsetof(d, f)
#endif
/* Define/disable kernel-specific declarators */