• Masahiro Yamada's avatar
    arch: msgbuf.h: make uapi asm/msgbuf.h self-contained · 9ef0e004
    Masahiro Yamada authored
    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/20191030063855.9989-2-yamada.masahiro@socionext.comSigned-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    9ef0e004
msgbuf.h 1.05 KB