[libc-commits] [libc] [libc] Fix types provided by fcntl.h header. (PR #219121)
via libc-commits
libc-commits at lists.llvm.org
Wed Aug 26 22:48:00 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Alexey Samsonov (vonosmas)
<details>
<summary>Changes</summary>
According to POSIX, `<fcntl.h>` header should provide definitions for `f_owner_ex` structure, `flock` structure, as well as `mode_t`, `off_t`, and `pid_t` types. Reflect that in the YAML definition to ensure generated `<fcntl.h>` indeed provide them. The type definitions themselves were already present in the LLVM-libc.
This fixes another problem while building Clang on Linux against LLVM-libc (issue #<!-- -->97191)
---
Full diff: https://github.com/llvm/llvm-project/pull/219121.diff
2 Files Affected:
- (modified) libc/include/CMakeLists.txt (+1-1)
- (modified) libc/include/fcntl.yaml (+5-1)
``````````diff
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index d44febe667cb1..65d3393e9525f 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -64,9 +64,9 @@ add_header_macro(
DEPENDS
.llvm-libc-macros.fcntl_macros
.llvm-libc-types.mode_t
+ .llvm-libc-types.struct_f_owner_ex
.llvm-libc-types.struct_flock
.llvm-libc-types.struct_flock64
- .llvm-libc-types.off64_t
.llvm-libc-types.pid_t
.llvm-libc-types.off_t
.llvm_libc_common_h
diff --git a/libc/include/fcntl.yaml b/libc/include/fcntl.yaml
index 8950f5b17cf37..43226b455051a 100644
--- a/libc/include/fcntl.yaml
+++ b/libc/include/fcntl.yaml
@@ -11,8 +11,12 @@ macros:
- macro_name: AT_EACCESS
macro_header: fcntl-macros.h
types:
- - type_name: off_t
- type_name: mode_t
+ - type_name: off_t
+ - type_name: pid_t
+ - type_name: struct_f_owner_ex
+ - type_name: struct_flock
+ - type_name: struct_flock64
enums: []
objects: []
functions:
``````````
</details>
https://github.com/llvm/llvm-project/pull/219121
More information about the libc-commits
mailing list