git: 23be969c12b2 - main - libsysdecode: Fix some cpp conditionals
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Oct 2026 15:21:54 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=23be969c12b2c2bb879aa1f2d606478a67a20852
commit 23be969c12b2c2bb879aa1f2d606478a67a20852
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-10-08 15:21:06 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-10-08 15:21:06 +0000
libsysdecode: Fix some cpp conditionals
While testing the bare values happens to work, the intent is to test
for their definition.
Reviewed by: emaste
Fixes: 9a16bd169e8c ("libsysdecode: support errno and syscalls for arm64 Linux")
Fixes: b69ae1a34c6f ("libsysdecode: Add preliminary support for decoding Linux syscalls")
Differential Revision: https://reviews.freebsd.org/D60415
---
lib/libsysdecode/linux.c | 4 ++--
lib/libsysdecode/syscallnames.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/libsysdecode/linux.c b/lib/libsysdecode/linux.c
index 1ad3b4f89806..e0bd463ca89e 100644
--- a/lib/libsysdecode/linux.c
+++ b/lib/libsysdecode/linux.c
@@ -35,9 +35,9 @@
#ifdef __aarch64__
#include <arm64/linux/linux.h>
-#elif __i386__
+#elif defined(__i386__)
#include <i386/linux/linux.h>
-#elif __amd64__
+#elif defined(__amd64__)
#include <amd64/linux/linux.h>
#else
#error "Unsupported Linux arch"
diff --git a/lib/libsysdecode/syscallnames.c b/lib/libsysdecode/syscallnames.c
index da356d8ac016..cb7b55cc1607 100644
--- a/lib/libsysdecode/syscallnames.c
+++ b/lib/libsysdecode/syscallnames.c
@@ -50,7 +50,7 @@ static
static
#ifdef __aarch64__
#include <arm64/linux/linux_syscalls.c>
-#elif __amd64__
+#elif defined(__amd64__)
#include <amd64/linux/linux_syscalls.c>
#else
#include <i386/linux/linux_syscalls.c>