[libc-commits] [libc] [libc][sys] add header and functions for sys ipc (PR #182700)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Sun Feb 22 10:43:51 PST 2026
================
@@ -0,0 +1,33 @@
+//===-- Definition of struct ipc_perm -------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TYPES_STRUCT_IPC_PERM_H
+#define LLVM_LIBC_TYPES_STRUCT_IPC_PERM_H
+
+#include "gid_t.h"
+#include "key_t.h"
+#include "uid_t.h"
+
+#ifdef __linux__
+struct ipc_perm {
+ key_t __key;
+ uid_t uid;
+ gid_t gid;
+ uid_t cuid;
+ gid_t cgid;
+ unsigned short mode;
----------------
vonosmas wrote:
Shouldn't this be `mode_t`? (https://man7.org/linux/man-pages/man0/sys_ipc.h.0p.html)
Also, I wonder why you need to specify the rest of the fields here (e.g. padding/unused).
https://github.com/llvm/llvm-project/pull/182700
More information about the libc-commits
mailing list