Skip to content

[NFC] Remove redundant sys/file.h header. #124684

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
Jan 28, 2025
Merged

[NFC] Remove redundant sys/file.h header. #124684

merged 1 commit into from
Jan 28, 2025

Conversation

c8ef
Copy link
Contributor

@c8ef c8ef commented Jan 28, 2025

Closes #124652.

This header was introduced in 5367369, but it appears that including only fnctl.h should be enough. Hopefully, this patch will not cause build issues on other Unix platforms.

@c8ef c8ef changed the title Draft [NFC] Remove redundant sys/file.h header. Jan 28, 2025
@c8ef c8ef marked this pull request as ready for review January 28, 2025 06:35
@c8ef c8ef requested a review from nickdesaulniers January 28, 2025 06:36
@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-llvm-support

Author: None (c8ef)

Changes

Closes #124652.


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

1 Files Affected:

  • (modified) llvm/lib/Support/Unix/Path.inc (-1)
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 1ad3a549a5a542..6004e007c0c7a0 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -29,7 +29,6 @@
 
 #include <dirent.h>
 #include <pwd.h>
-#include <sys/file.h>
 
 #ifdef __APPLE__
 #include <copyfile.h>

Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

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

Let's try this, but if merging it breaks the build, let's revert? Consider mentioning 5367369 in the commit message when you merge this, and that it should have just relied on the already included fcntl.h. Thanks for the patch!

@c8ef
Copy link
Contributor Author

c8ef commented Jan 28, 2025

Consider mentioning 5367369 in the commit message when you merge this

Done.

@c8ef c8ef merged commit f388ca3 into llvm:main Jan 28, 2025
12 checks passed
@c8ef c8ef deleted the header branch January 28, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[llvm] 'sys/file.h' file not found when building clang with llvm-libc
3 participants