mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
0fb9dc2867
Userspace cannot compile <asm/sembuf.h> due to some missing type definitions. For example, building it for x86 fails as follows: CC usr/include/asm/sembuf.h.s In file included from <command-line>:32:0: usr/include/asm/sembuf.h:17:20: error: field `sem_perm' has incomplete type struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ ^~~~~~~~ usr/include/asm/sembuf.h:24:2: error: unknown type name `__kernel_time_t' __kernel_time_t sem_otime; /* last semop time */ ^~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:25:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused1; ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:26:2: error: unknown type name `__kernel_time_t' __kernel_time_t sem_ctime; /* last change time */ ^~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:27:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused2; ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:29:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t sem_nsems; /* no. of semaphores in array */ ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:30:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused3; ^~~~~~~~~~~~~~~~ usr/include/asm/sembuf.h:31:2: error: unknown type name `__kernel_ulong_t' __kernel_ulong_t __unused4; ^~~~~~~~~~~~~~~~ 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/20191030063855.9989-3-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
/*
|
|
* include/asm-xtensa/sembuf.h
|
|
*
|
|
* The semid64_ds structure for Xtensa architecture.
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2001 - 2005 Tensilica Inc.
|
|
*
|
|
* Note extra padding because this structure is passed back and forth
|
|
* between kernel and user space.
|
|
*
|
|
* Pad space is left for:
|
|
* - 2 miscellaneous 32-bit values
|
|
*
|
|
*/
|
|
|
|
#ifndef _XTENSA_SEMBUF_H
|
|
#define _XTENSA_SEMBUF_H
|
|
|
|
#include <asm/byteorder.h>
|
|
#include <asm/ipcbuf.h>
|
|
|
|
struct semid64_ds {
|
|
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
|
|
#ifdef __XTENSA_EL__
|
|
unsigned long sem_otime; /* last semop time */
|
|
unsigned long sem_otime_high;
|
|
unsigned long sem_ctime; /* last change time */
|
|
unsigned long sem_ctime_high;
|
|
#else
|
|
unsigned long sem_otime_high;
|
|
unsigned long sem_otime; /* last semop time */
|
|
unsigned long sem_ctime_high;
|
|
unsigned long sem_ctime; /* last change time */
|
|
#endif
|
|
unsigned long sem_nsems; /* no. of semaphores in array */
|
|
unsigned long __unused3;
|
|
unsigned long __unused4;
|
|
};
|
|
|
|
#endif /* __ASM_XTENSA_SEMBUF_H */
|