[llvm] [ADT] Make use of the endian.h header on OpenBSD (PR #71144)
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 21:59:22 PDT 2023
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/71144
OpenBSD prefers the use of the endian.h header.
>From c0a69cfa3a8f40ac2ae01662b8edb66850e4a475 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Fri, 3 Nov 2023 00:56:40 -0400
Subject: [PATCH] [ADT] Make use of the endian.h header on OpenBSD
OpenBSD prefers the use of the endian.h header.
---
llvm/include/llvm/ADT/bit.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/ADT/bit.h b/llvm/include/llvm/ADT/bit.h
index 0a228b2204d6fc2..12223facbb30500 100644
--- a/llvm/include/llvm/ADT/bit.h
+++ b/llvm/include/llvm/ADT/bit.h
@@ -28,7 +28,7 @@
#endif
#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) || \
- defined(__Fuchsia__) || defined(__EMSCRIPTEN__)
+ defined(__Fuchsia__) || defined(__EMSCRIPTEN__) || defined(__OpenBSD__)
#include <endian.h>
#elif defined(_AIX)
#include <sys/machine.h>
More information about the llvm-commits
mailing list