From e2fe8bb5b6bdd66415ae882cc6ef89eba9f67c97 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Boric Date: Sun, 13 Nov 2016 22:18:54 +0100 Subject: [PATCH] rump: fix kernel headers --- sys/arch/i386/include/mcontext.h | 6 +++++- sys/arch/i386/include/signal.h | 4 ++-- sys/dev/vndvar.h | 6 ++---- sys/sys/errno.h | 3 +++ sys/sys/ioctl.h | 2 +- sys/sys/time.h | 2 +- sys/sys/ucred.h | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sys/arch/i386/include/mcontext.h b/sys/arch/i386/include/mcontext.h index 6eebe2eed..1e3957d31 100644 --- a/sys/arch/i386/include/mcontext.h +++ b/sys/arch/i386/include/mcontext.h @@ -141,10 +141,14 @@ int getmcontext(mcontext_t *mcp); #define MCF_MAGIC 0xc0ffee #define _MC_FPU_SAVED 0x001 -#endif /* defined(__minix) */ +#define __UCONTEXT_SIZE 784 + +#else #define __UCONTEXT_SIZE 776 +#endif /* defined(__minix) */ + static __inline void * __lwp_getprivate_fast(void) { diff --git a/sys/arch/i386/include/signal.h b/sys/arch/i386/include/signal.h index 086302b86..a1c081a6f 100644 --- a/sys/arch/i386/include/signal.h +++ b/sys/arch/i386/include/signal.h @@ -36,7 +36,7 @@ #include -#if defined(__minix) && (defined(_LIBMINC) || ! defined(_STANDALONE)) +#if !defined(_KERNEL) && defined(__minix) && (defined(_LIBMINC) || ! defined(_STANDALONE)) #include #endif /* defined(__minix) ... */ @@ -108,7 +108,7 @@ struct sigcontext { int sc_err; sigset_t sc_mask; /* signal mask to restore (new style) */ -#if defined(__minix) && (defined(_LIBMINC) || ! defined(_STANDALONE)) +#if !defined(_KERNEL) && defined(__minix) && (defined(_LIBMINC) || ! defined(_STANDALONE)) union fpu_state_u sc_fpu_state; int trap_style; /* KTS_* method of entering kernel */ int sc_flags; /* MF_FPU_INITIALIZED if fpu state valid */ diff --git a/sys/dev/vndvar.h b/sys/dev/vndvar.h index fc7d665a7..a3f74635e 100644 --- a/sys/dev/vndvar.h +++ b/sys/dev/vndvar.h @@ -89,14 +89,14 @@ struct vndgeom { * Ioctl definitions for file (vnode) disk pseudo-device. */ struct vnd_ioctl { -#if !defined(__minix) +#if !defined(__minix) || defined(_KERNEL) char *vnd_file; /* pathname of file to mount */ #else int vnd_fildes; /* file descriptor of file to mount */ #endif /* !defined(__minix)*/ int vnd_flags; /* flags; see below */ struct vndgeom vnd_geom; /* geometry to emulate */ -#if !defined(__minix) +#if !defined(__minix) || defined(_KERNEL) unsigned int vnd_osize; /* (returned) size of disk */ #endif /* !defined(__minix)*/ uint64_t vnd_size; /* (returned) size of disk */ @@ -107,7 +107,6 @@ struct vnd_ioctl { #define VNDIOF_READONLY 0x02 /* as read-only device */ #define VNDIOF_FORCE 0x04 /* force close */ -#if !defined(__minix) #ifdef _KERNEL struct vnode; @@ -162,7 +161,6 @@ struct vnd_comp_header u_int32_t block_size; u_int32_t num_blocks; }; -#endif /* !defined(__minix) */ /* * A simple structure for describing which vnd units are in use. diff --git a/sys/sys/errno.h b/sys/sys/errno.h index c4ecb6047..71f60520d 100644 --- a/sys/sys/errno.h +++ b/sys/sys/errno.h @@ -192,6 +192,7 @@ # define _SIGN #endif +#if !defined(_KERNEL) /* minix-specific error codes */ #define ERESTART (_SIGN 200 ) /* service restarted */ #define ENOTREADY (_SIGN 201 ) /* source or destination is not ready */ @@ -212,6 +213,8 @@ #define EBADEPT (_SIGN 216 ) /* specified endpoint is bad */ #define EBADCPU (_SIGN 217 ) /* requested CPU does not work */ +#endif /* !defined(_KERNEL) */ + #endif /* defined(__minix) */ #endif /* !_SYS_ERRNO_H_ */ diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 393f57453..542c4f6fb 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -61,7 +61,7 @@ struct ttysize { #include #include -#if defined(__minix) +#if !defined(_KERNEL) && defined(__minix) /* ioctls */ #include /* 'n' */ #include /* 'd' */ diff --git a/sys/sys/time.h b/sys/sys/time.h index 5d4f3b4c1..9def359ce 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -281,7 +281,7 @@ struct itimerspec { }; #define CLOCK_REALTIME 0 -#if !defined(__minix) +#if !defined(__minix) || defined(_KERNEL) #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 #endif /* !defined(__minix) */ diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 17ca57ce6..bceab14b8 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -53,7 +53,7 @@ struct uucred { gid_t cr_groups[NGROUPS_MAX]; /* groups */ }; -#if defined(__minix) +#if defined(__minix) && !defined(_KERNEL) #include int getnucred(endpoint_t proc_ep, struct uucred *ucred);