[libc-commits] [libc] [libc] Fix types provided by fcntl.h header. (PR #219121)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Wed Aug 26 22:47:17 PDT 2026
https://github.com/vonosmas created https://github.com/llvm/llvm-project/pull/219121
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)
>From 2545560e03f0b2a50dbc2ce6df3c2ab07032f20e Mon Sep 17 00:00:00 2001
From: Alexey Samsonov <vonosmas at gmail.com>
Date: Thu, 27 Aug 2026 05:43:38 +0000
Subject: [PATCH] [libc] Fix types provided by fcntl.h header.
---
libc/include/CMakeLists.txt | 2 +-
libc/include/fcntl.yaml | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
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:
More information about the libc-commits
mailing list