[libc-commits] [libc] 0182f51 - [libc][fix] Use off_t libc type directly

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Jul 8 18:21:29 PDT 2024


Author: Joseph Huber
Date: 2024-07-08T20:21:23-05:00
New Revision: 0182f5174f7cab31f8275718ae0aca7e9ac6fcd2

URL: https://github.com/llvm/llvm-project/commit/0182f5174f7cab31f8275718ae0aca7e9ac6fcd2
DIFF: https://github.com/llvm/llvm-project/commit/0182f5174f7cab31f8275718ae0aca7e9ac6fcd2.diff

LOG: [libc][fix] Use off_t libc type directly

Summary:
Including stdio here caused some multiple definitions on overlay mode.
Just include `off_t` directly.

Is this correct for 32-bit targets? Will investigate further after
fixing bots.

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 828e71424c593..cc82a7ecc9745 100644
--- a/libc/src/__support/File/file.h
+++ b/libc/src/__support/File/file.h
@@ -9,6 +9,7 @@
 #ifndef LLVM_LIBC_SRC___SUPPORT_FILE_FILE_H
 #define LLVM_LIBC_SRC___SUPPORT_FILE_FILE_H
 
+#include "include/llvm-libc-types/off_t.h"
 #include "src/__support/CPP/new.h"
 #include "src/__support/error_or.h"
 #include "src/__support/macros/properties/architectures.h"
@@ -16,7 +17,6 @@
 
 #include <stddef.h>
 #include <stdint.h>
-#include <stdio.h>
 
 namespace LIBC_NAMESPACE {
 


        


More information about the libc-commits mailing list