rump: fix kernel headers

This commit is contained in:
Jean-Baptiste Boric 2016-11-13 22:18:54 +01:00
parent 9a141b4152
commit e2fe8bb5b6
7 changed files with 15 additions and 10 deletions

View File

@ -141,10 +141,14 @@ int getmcontext(mcontext_t *mcp);
#define MCF_MAGIC 0xc0ffee #define MCF_MAGIC 0xc0ffee
#define _MC_FPU_SAVED 0x001 #define _MC_FPU_SAVED 0x001
#endif /* defined(__minix) */ #define __UCONTEXT_SIZE 784
#else
#define __UCONTEXT_SIZE 776 #define __UCONTEXT_SIZE 776
#endif /* defined(__minix) */
static __inline void * static __inline void *
__lwp_getprivate_fast(void) __lwp_getprivate_fast(void)
{ {

View File

@ -36,7 +36,7 @@
#include <sys/featuretest.h> #include <sys/featuretest.h>
#if defined(__minix) && (defined(_LIBMINC) || ! defined(_STANDALONE)) #if !defined(_KERNEL) && defined(__minix) && (defined(_LIBMINC) || ! defined(_STANDALONE))
#include <machine/fpu.h> #include <machine/fpu.h>
#endif /* defined(__minix) ... */ #endif /* defined(__minix) ... */
@ -108,7 +108,7 @@ struct sigcontext {
int sc_err; int sc_err;
sigset_t sc_mask; /* signal mask to restore (new style) */ 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; union fpu_state_u sc_fpu_state;
int trap_style; /* KTS_* method of entering kernel */ int trap_style; /* KTS_* method of entering kernel */
int sc_flags; /* MF_FPU_INITIALIZED if fpu state valid */ int sc_flags; /* MF_FPU_INITIALIZED if fpu state valid */

View File

@ -89,14 +89,14 @@ struct vndgeom {
* Ioctl definitions for file (vnode) disk pseudo-device. * Ioctl definitions for file (vnode) disk pseudo-device.
*/ */
struct vnd_ioctl { struct vnd_ioctl {
#if !defined(__minix) #if !defined(__minix) || defined(_KERNEL)
char *vnd_file; /* pathname of file to mount */ char *vnd_file; /* pathname of file to mount */
#else #else
int vnd_fildes; /* file descriptor of file to mount */ int vnd_fildes; /* file descriptor of file to mount */
#endif /* !defined(__minix)*/ #endif /* !defined(__minix)*/
int vnd_flags; /* flags; see below */ int vnd_flags; /* flags; see below */
struct vndgeom vnd_geom; /* geometry to emulate */ struct vndgeom vnd_geom; /* geometry to emulate */
#if !defined(__minix) #if !defined(__minix) || defined(_KERNEL)
unsigned int vnd_osize; /* (returned) size of disk */ unsigned int vnd_osize; /* (returned) size of disk */
#endif /* !defined(__minix)*/ #endif /* !defined(__minix)*/
uint64_t vnd_size; /* (returned) size of disk */ 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_READONLY 0x02 /* as read-only device */
#define VNDIOF_FORCE 0x04 /* force close */ #define VNDIOF_FORCE 0x04 /* force close */
#if !defined(__minix)
#ifdef _KERNEL #ifdef _KERNEL
struct vnode; struct vnode;
@ -162,7 +161,6 @@ struct vnd_comp_header
u_int32_t block_size; u_int32_t block_size;
u_int32_t num_blocks; u_int32_t num_blocks;
}; };
#endif /* !defined(__minix) */
/* /*
* A simple structure for describing which vnd units are in use. * A simple structure for describing which vnd units are in use.

View File

@ -192,6 +192,7 @@
# define _SIGN # define _SIGN
#endif #endif
#if !defined(_KERNEL)
/* minix-specific error codes */ /* minix-specific error codes */
#define ERESTART (_SIGN 200 ) /* service restarted */ #define ERESTART (_SIGN 200 ) /* service restarted */
#define ENOTREADY (_SIGN 201 ) /* source or destination is not ready */ #define ENOTREADY (_SIGN 201 ) /* source or destination is not ready */
@ -212,6 +213,8 @@
#define EBADEPT (_SIGN 216 ) /* specified endpoint is bad */ #define EBADEPT (_SIGN 216 ) /* specified endpoint is bad */
#define EBADCPU (_SIGN 217 ) /* requested CPU does not work */ #define EBADCPU (_SIGN 217 ) /* requested CPU does not work */
#endif /* !defined(_KERNEL) */
#endif /* defined(__minix) */ #endif /* defined(__minix) */
#endif /* !_SYS_ERRNO_H_ */ #endif /* !_SYS_ERRNO_H_ */

View File

@ -61,7 +61,7 @@ struct ttysize {
#include <sys/filio.h> #include <sys/filio.h>
#include <sys/sockio.h> #include <sys/sockio.h>
#if defined(__minix) #if !defined(_KERNEL) && defined(__minix)
/* ioctls */ /* ioctls */
#include <sys/ioc_net.h> /* 'n' */ #include <sys/ioc_net.h> /* 'n' */
#include <sys/ioc_disk.h> /* 'd' */ #include <sys/ioc_disk.h> /* 'd' */

View File

@ -281,7 +281,7 @@ struct itimerspec {
}; };
#define CLOCK_REALTIME 0 #define CLOCK_REALTIME 0
#if !defined(__minix) #if !defined(__minix) || defined(_KERNEL)
#define CLOCK_VIRTUAL 1 #define CLOCK_VIRTUAL 1
#define CLOCK_PROF 2 #define CLOCK_PROF 2
#endif /* !defined(__minix) */ #endif /* !defined(__minix) */

View File

@ -53,7 +53,7 @@ struct uucred {
gid_t cr_groups[NGROUPS_MAX]; /* groups */ gid_t cr_groups[NGROUPS_MAX]; /* groups */
}; };
#if defined(__minix) #if defined(__minix) && !defined(_KERNEL)
#include <minix/type.h> #include <minix/type.h>
int getnucred(endpoint_t proc_ep, struct uucred *ucred); int getnucred(endpoint_t proc_ep, struct uucred *ucred);