Re: [PATCH] Revert "MIPS: Provide correct siginfo_t.si_stime"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So the whole include dependency is a mess.

arch/mips/include/uapi/asm/siginfo.h defines siginfo_t structure, which
requires ./include/uapi/asm-generic/siginfo.h for definition of SI_MAX_SIZE
and others, but it can't include ./include/asm-generic/siginfo.h, because
that one contains inline function copy_siginfo, which dereferences
siginfo_t structure.

It can be solved by
 - Modifying generic siginfo definition to allow swapping si_code and
   si_errno either by changing the definition to
     typedef struct siginfo {
        int si_signo;
        int __ARCH_SI_SECOND_MEMBER;
        int __ARCH_SI_THIRD_MEMBER;
   or by providing swapping define
     typedef struct siginfo {
        int si_signo;
     #ifdef    __ARCH_SI_SWAP_ERRNO_CODE
        int si_code;
        int si_errno;
     #else
        int si_errno;
        int si_code;
     #endif
   then the generic definition can be used.

 - Coping copy_siginfo into arch specific include file also solves the problem

 - Use #ifdef __KERNEL__

Comments, please.
  P.





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux