-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[libc] Use stdio.h
for off_t
instead of unistd.h
#98093
Conversation
Summary: The `stdio.h` header should define `off_t` as defined for the platform. This will use the system's in overlay mode, or what the llvm-libc-types deems correct. If this `off_t` is incorrect it should be changed in `llvm-libc-types`. This fixes the GPU build.
@llvm/pr-subscribers-libc Author: Joseph Huber (jhuber6) ChangesSummary: Full diff: https://github.com/llvm/llvm-project/pull/98093.diff 1 Files Affected:
diff --git a/libc/src/__support/File/file.h b/libc/src/__support/File/file.h
index ec543ac1ac5f3..828e71424c593 100644
--- a/libc/src/__support/File/file.h
+++ b/libc/src/__support/File/file.h
@@ -16,7 +16,7 @@
#include <stddef.h>
#include <stdint.h>
-#include <unistd.h> // For off_t.
+#include <stdio.h>
namespace LIBC_NAMESPACE {
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a fix for now
@@ -16,7 +16,7 @@ | |||
|
|||
#include <stddef.h> | |||
#include <stdint.h> | |||
#include <unistd.h> // For off_t. | |||
#include <stdio.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a TODO to move these to proper proxy header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no regressions on rv32, thanks for the fix
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/43/builds/1637 Here is the relevant piece of the build log for the reference:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/1584 Here is the relevant piece of the build log for the reference:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/2317 Here is the relevant piece of the build log for the reference:
|
Summary: The `stdio.h` header should define `off_t` as defined for the platform. This will use the system's in overlay mode, or what the llvm-libc-types deems correct. If this `off_t` is incorrect it should be changed in `llvm-libc-types`. This fixes the GPU build.
Summary:
The
stdio.h
header should defineoff_t
as defined for the platform.This will use the system's in overlay mode, or what the llvm-libc-types
deems correct. If this
off_t
is incorrect it should be changed inllvm-libc-types
. This fixes the GPU build.