Skip to content

Commit 9ef0e00

Browse files
masahir0ytorvalds
authored andcommitted
arch: msgbuf.h: make uapi asm/msgbuf.h self-contained
Userspace cannot compile <asm/msgbuf.h> due to some missing type definitions. For example, building it for x86 fails as follows: CC usr/include/asm/msgbuf.h.s In file included from usr/include/asm/msgbuf.h:6:0, from <command-line>:32: usr/include/asm-generic/msgbuf.h:25:20: error: field `msg_perm' has incomplete type struct ipc64_perm msg_perm; ^~~~~~~~ usr/include/asm-generic/msgbuf.h:27:2: error: unknown type name `__kernel_time_t' __kernel_time_t msg_stime; /* last msgsnd time */ ^~~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:28:2: error: unknown type name `__kernel_time_t' __kernel_time_t msg_rtime; /* last msgrcv time */ ^~~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:29:2: error: unknown type name `__kernel_time_t' __kernel_time_t msg_ctime; /* last change time */ ^~~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:41:2: error: unknown type name `__kernel_pid_t' __kernel_pid_t msg_lspid; /* pid of last msgsnd */ ^~~~~~~~~~~~~~ usr/include/asm-generic/msgbuf.h:42:2: error: unknown type name `__kernel_pid_t' __kernel_pid_t msg_lrpid; /* last receive pid */ ^~~~~~~~~~~~~~ It is just a matter of missing include directive. Include <asm/ipcbuf.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 5b00967 commit 9ef0e00

File tree

8 files changed

+13
-1
lines changed

8 files changed

+13
-1
lines changed

arch/mips/include/uapi/asm/msgbuf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#ifndef _ASM_MSGBUF_H
33
#define _ASM_MSGBUF_H
44

5+
#include <asm/ipcbuf.h>
56

67
/*
78
* The msqid64_ds structure for the MIPS architecture.

arch/parisc/include/uapi/asm/msgbuf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define _PARISC_MSGBUF_H
44

55
#include <asm/bitsperlong.h>
6+
#include <asm/ipcbuf.h>
67

78
/*
89
* The msqid64_ds structure for parisc architecture, copied from sparc.

arch/powerpc/include/uapi/asm/msgbuf.h

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

5+
#include <asm/ipcbuf.h>
6+
57
/*
68
* The msqid64_ds structure for the PowerPC architecture.
79
* Note extra padding because this structure is passed back and forth

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

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

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

arch/x86/include/uapi/asm/msgbuf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#if !defined(__x86_64__) || !defined(__ILP32__)
66
#include <asm-generic/msgbuf.h>
77
#else
8+
9+
#include <asm/ipcbuf.h>
10+
811
/*
912
* The msqid64_ds structure for x86 architecture with x32 ABI.
1013
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef _XTENSA_MSGBUF_H
1818
#define _XTENSA_MSGBUF_H
1919

20+
#include <asm/ipcbuf.h>
21+
2022
struct msqid64_ds {
2123
struct ipc64_perm msg_perm;
2224
#ifdef __XTENSA_EB__

include/uapi/asm-generic/msgbuf.h

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

55
#include <asm/bitsperlong.h>
6+
#include <asm/ipcbuf.h>
7+
68
/*
79
* generic msqid64_ds structure.
810
*

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/msgbuf.h
2019
header-test- += asm/sembuf.h
2120
header-test- += asm/shmbuf.h
2221
header-test- += asm/signal.h

0 commit comments

Comments
 (0)