[libc-commits] [libc] 673b6cd - [libc] Use `stdio.h` for `off_t` instead of `unistd.h` (#98093)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 8 18:12:37 PDT 2024


Author: Joseph Huber
Date: 2024-07-08T20:12:34-05:00
New Revision: 673b6cd104beddac08cec46e7cbf74d7fcc44abc

URL: https://github.com/llvm/llvm-project/commit/673b6cd104beddac08cec46e7cbf74d7fcc44abc
DIFF: https://github.com/llvm/llvm-project/commit/673b6cd104beddac08cec46e7cbf74d7fcc44abc.diff

LOG: [libc] Use `stdio.h` for `off_t` instead of `unistd.h` (#98093)

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.

Added: 
    

Modified: 
    libc/src/__support/File/file.h

Removed: 
    


################################################################################
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 {
 


        


More information about the libc-commits mailing list