Skip to content

Commit 5b00967

Browse files
masahir0ytorvalds
authored andcommitted
arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained
Userspace cannot compile <asm/ipcbuf.h> due to some missing type definitions. For example, building it for x86 fails as follows: CC usr/include/asm/ipcbuf.h.s In file included from usr/include/asm/ipcbuf.h:1:0, from <command-line>:32: usr/include/asm-generic/ipcbuf.h:21:2: error: unknown type name `__kernel_key_t' __kernel_key_t key; ^~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:22:2: error: unknown type name `__kernel_uid32_t' __kernel_uid32_t uid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:23:2: error: unknown type name `__kernel_gid32_t' __kernel_gid32_t gid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:24:2: error: unknown type name `__kernel_uid32_t' __kernel_uid32_t cuid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:25:2: error: unknown type name `__kernel_gid32_t' __kernel_gid32_t cgid; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:26:2: error: unknown type name `__kernel_mode_t' __kernel_mode_t mode; ^~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:28:35: error: `__kernel_mode_t' undeclared here (not in a function) unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; ^~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:31:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused1; ^~~~~~~~~~~~~~~~ usr/include/asm-generic/ipcbuf.h:32:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused2; ^~~~~~~~~~~~~~~~ It is just a matter of missing include directive. Include <linux/posix_types.h> to make it self-contained, and add it to the compile-test coverage. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Masahiro Yamada <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent ce5c31d commit 5b00967

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

arch/s390/include/uapi/asm/ipcbuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef __S390_IPCBUF_H__
33
#define __S390_IPCBUF_H__
44

5+
#include <linux/posix_types.h>
6+
57
/*
68
* The user_ipc_perm structure for S/390 architecture.
79
* Note extra padding because this structure is passed back and forth

arch/sparc/include/uapi/asm/ipcbuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef __SPARC_IPCBUF_H
33
#define __SPARC_IPCBUF_H
44

5+
#include <linux/posix_types.h>
6+
57
/*
68
* The ipc64_perm structure for sparc/sparc64 architecture.
79
* Note extra padding because this structure is passed back and forth

arch/xtensa/include/uapi/asm/ipcbuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#ifndef _XTENSA_IPCBUF_H
1313
#define _XTENSA_IPCBUF_H
1414

15+
#include <linux/posix_types.h>
16+
1517
/*
1618
* Pad space is left for:
1719
* - 32-bit mode_t and seq

include/uapi/asm-generic/ipcbuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef __ASM_GENERIC_IPCBUF_H
33
#define __ASM_GENERIC_IPCBUF_H
44

5+
#include <linux/posix_types.h>
6+
57
/*
68
* The generic ipc64_perm structure:
79
* Note extra padding because this structure is passed back and forth

usr/include/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include
1616
# Please consider to fix the header first.
1717
#
1818
# Sorted alphabetically.
19-
header-test- += asm/ipcbuf.h
2019
header-test- += asm/msgbuf.h
2120
header-test- += asm/sembuf.h
2221
header-test- += asm/shmbuf.h

0 commit comments

Comments
 (0)