aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/sys
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2018-10-18 17:19:50 -0500
committerJoel Sherrill <joel@rtems.org>2018-10-18 17:19:50 -0500
commit037428fae327bb25c4421d01b35036f7f1e81a96 (patch)
treedcd7d2766eef3490918ced53824c2713bc8ecb6f /newlib/libc/sys
parent473f1a3a5dffbcc18160167a75e05bfa0a4ec1e0 (diff)
downloadnewlib-037428fae327bb25c4421d01b35036f7f1e81a96.zip
newlib-037428fae327bb25c4421d01b35036f7f1e81a96.tar.gz
newlib-037428fae327bb25c4421d01b35036f7f1e81a96.tar.bz2
newlib/libc/sys/rtems/include/machine/param.h: Add _KERNEL to stop method leakage
The following FreeBSD kernel methods are not in any standard and prototypes/definitions were leaking into application space: + round_page() + trunc_page() + atop() + ptoa() + pgtok()
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/rtems/include/machine/param.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/newlib/libc/sys/rtems/include/machine/param.h b/newlib/libc/sys/rtems/include/machine/param.h
index 4892b61..e37d056 100644
--- a/newlib/libc/sys/rtems/include/machine/param.h
+++ b/newlib/libc/sys/rtems/include/machine/param.h
@@ -71,6 +71,7 @@
#define MAXPAGESIZES 1 /* maximum number of supported page sizes */
+#ifdef _KERNEL
/*
* Mach derived conversion macros
*/
@@ -82,4 +83,6 @@
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
+#endif
+
#endif /* !_MACHINE_PARAM_H_ */