Skip to contentSkip to conversation

ipc/shm: uapi: remove dependency on libc

PATCH Applied Thomas Weißschuh 1 participant 1 message Dec 22, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipc/shm: uapi: remove dependency on libc

Using libc types and headers from the UAPI headers is problematic as it introduces a dependency on a full C toolchain. shm.h does not even use any symbols from the libc header as the usage of getpagesize() was removed a decade ago in commit 060028bac94b ("ipc/shm.c: increase the defaults for SHMALL, SHMMAX")

Drop the unnecessary inclusion.

---
 include/uapi/linux/shm.h | 3 ---
 1 file changed, 3 deletions(-)
include/uapi/linux/shm.h +0 -3
index 8d1f17a4e08e..7269f9f402e3 100644
@@ -5,9 +5,6 @@
 #include <linux/ipc.h>
 #include <linux/errno.h>
 #include <asm-generic/hugetlb_encode.h>
-#ifndef __KERNEL__
-#include <unistd.h>
-#endif
 
 /*
  * SHMMNI, SHMMAX and SHMALL are default upper limits which can be

---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251222-uapi-shm-d96df0ff7366

Best regards,

Signature · 1 line
Thomas Weißschuh <[email protected]>