[libc-commits] [libc] [libc] Use `stdio.h` for `off_t` instead of `unistd.h` (PR #98093)
via libc-commits
libc-commits at lists.llvm.org
Mon Jul 8 15:45:23 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Joseph Huber (jhuber6)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/98093.diff
1 Files Affected:
- (modified) libc/src/__support/File/file.h (+1-1)
``````````diff
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 {
``````````
</details>
https://github.com/llvm/llvm-project/pull/98093
More information about the libc-commits
mailing list