Skip to content

[lldb] Simplify pipe2(2) handling on FreeBSD #74019

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
Dec 1, 2023

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Dec 1, 2023

FreeBSD 10.x and 11.x support has been dropped leaving 12.x as the minimum version. This FreeBSD check can be simplified.

812dad5

FreeBSD 10.x and 11.x support has been dropped leaving 12.x as the
minimum version. This FreeBSD check can be simplified.

llvm@812dad5
@brad0 brad0 requested a review from JDevlieghere as a code owner December 1, 2023 01:28
@llvmbot llvmbot added the lldb label Dec 1, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 1, 2023

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

Changes

FreeBSD 10.x and 11.x support has been dropped leaving 12.x as the minimum version. This FreeBSD check can be simplified.

812dad5


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

1 Files Affected:

  • (modified) lldb/source/Host/posix/PipePosix.cpp (+2-2)
diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp
index 6fc4646953b4257..afd3fe39059ac17 100644
--- a/lldb/source/Host/posix/PipePosix.cpp
+++ b/lldb/source/Host/posix/PipePosix.cpp
@@ -31,8 +31,8 @@ enum PIPES { READ, WRITE }; // Constants 0 and 1 for READ and WRITE
 
 // pipe2 is supported by a limited set of platforms
 // TODO: Add more platforms that support pipe2.
-#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 10) ||       \
-    defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) ||       \
+    defined(__OpenBSD__)
 #define PIPE2_SUPPORTED 1
 #else
 #define PIPE2_SUPPORTED 0

@brad0 brad0 requested a review from bulbazord December 1, 2023 01:51
Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

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

Neat 👍

Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

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

🥳

@brad0 brad0 merged commit c3f0932 into llvm:main Dec 1, 2023
@brad0 brad0 deleted the lldb_pipeposix_pipe2_freebsd branch December 1, 2023 21:05
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.

4 participants