_MINIX_SYSTEM - fixes for in-minix crossbuild
. define _MINIX_SYSTEM for all system code from minix.service.mk . hide some system-level declarations and definitions behind _MINIX_SYSTEM to cleanly fix host tool build problems on Minix (such as: NONE being defined and paddr_t being used but not declared) . the similar definition _SYSTEM is unsuitable as it changes the values of errno definitions Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#ifndef _MINIX_DS_H
|
||||
#define _MINIX_DS_H
|
||||
|
||||
#ifdef _MINIX_SYSTEM
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <minix/endpoint.h>
|
||||
|
||||
@@ -66,5 +68,7 @@ int ds_delete_label(const char *ds_name);
|
||||
int ds_subscribe(const char *regex, int flags);
|
||||
int ds_check(char *ds_name, int *type, endpoint_t *owner_e);
|
||||
|
||||
#endif /* _MINIX_SYSTEM */
|
||||
|
||||
#endif /* _MINIX_DS_H */
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#ifndef _MINIX_ENDPOINT_H
|
||||
#define _MINIX_ENDPOINT_H 1
|
||||
|
||||
#ifdef _MINIX_SYSTEM
|
||||
|
||||
#include <minix/sys_config.h>
|
||||
#include <minix/com.h>
|
||||
#include <limits.h>
|
||||
@@ -68,4 +70,6 @@
|
||||
#define _ENDPOINT_P(e) \
|
||||
((((e)+MAX_NR_TASKS) & (_ENDPOINT_GENERATION_SIZE - 1)) - MAX_NR_TASKS)
|
||||
|
||||
#endif /* _MINIX_SYSTEM */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
/* Number of processes contained in the system image. */
|
||||
#define NR_BOOT_PROCS (NR_TASKS + LAST_SPECIAL_PROC_NR + 1)
|
||||
|
||||
#ifdef _MINIX_SYSTEM
|
||||
/* This is used to obtain system information through SYS_GETINFO. */
|
||||
#define MAXMEMMAP 40
|
||||
typedef struct kinfo {
|
||||
@@ -44,5 +45,6 @@ typedef struct kinfo {
|
||||
int kernel_allocated_bytes; /* used by kernel */
|
||||
int kernel_allocated_bytes_dynamic; /* used by kernel (runtime) */
|
||||
} kinfo_t;
|
||||
#endif /* _MINIX_SYSTEM */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user