Skip to content

[ADT] Make use of the endian.h header on OpenBSD #71144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Nov 3, 2023

OpenBSD prefers the use of the endian.h header.

OpenBSD prefers the use of the endian.h header.
@llvmbot
Copy link
Member

llvmbot commented Nov 3, 2023

@llvm/pr-subscribers-llvm-adt

Author: Brad Smith (brad0)

Changes

OpenBSD prefers the use of the endian.h header.


Full diff: https://github.com/llvm/llvm-project/pull/71144.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/bit.h (+1-1)
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>

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@brad0 brad0 merged commit 621d95a into llvm:main Nov 3, 2023
@brad0 brad0 deleted the adt_openbsd_endian branch November 3, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants