git: 1889a973af24 - stable/13 - sys/param.h: Add _WANT_P_OSREL
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 19 Feb 2023 05:47:19 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=1889a973af243373b1859827460910b1bee7495f
commit 1889a973af243373b1859827460910b1bee7495f
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-02-14 08:52:14 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-02-19 05:16:25 +0000
sys/param.h: Add _WANT_P_OSREL
(cherry picked from commit 5942b4b6fde3f4ce6d0295fbcf135f552f92c607)
---
lib/libc/amd64/sys/amd64_get_fsbase.c | 3 +--
lib/libc/amd64/sys/amd64_get_gsbase.c | 3 +--
lib/libc/amd64/sys/amd64_set_fsbase.c | 3 +--
lib/libc/amd64/sys/amd64_set_gsbase.c | 3 +--
libexec/rtld-elf/amd64/reloc.c | 1 +
libexec/rtld-elf/map_object.c | 1 +
sbin/fsck_ffs/main.c | 2 +-
sbin/newfs/mkfs.c | 2 +-
sys/sys/param.h | 2 +-
9 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/lib/libc/amd64/sys/amd64_get_fsbase.c b/lib/libc/amd64/sys/amd64_get_fsbase.c
index 2de99912daf2..04d872165e32 100644
--- a/lib/libc/amd64/sys/amd64_get_fsbase.c
+++ b/lib/libc/amd64/sys/amd64_get_fsbase.c
@@ -33,9 +33,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define IN_RTLD 1
+#define _WANT_P_OSREL
#include <sys/param.h>
-#undef IN_RTLD
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
#include <machine/sysarch.h>
diff --git a/lib/libc/amd64/sys/amd64_get_gsbase.c b/lib/libc/amd64/sys/amd64_get_gsbase.c
index 0deac34c90d1..35f69da6ac1e 100644
--- a/lib/libc/amd64/sys/amd64_get_gsbase.c
+++ b/lib/libc/amd64/sys/amd64_get_gsbase.c
@@ -33,9 +33,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define IN_RTLD 1
+#define _WANT_P_OSREL
#include <sys/param.h>
-#undef IN_RTLD
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
#include <machine/sysarch.h>
diff --git a/lib/libc/amd64/sys/amd64_set_fsbase.c b/lib/libc/amd64/sys/amd64_set_fsbase.c
index 02ca9233d855..9474b1148161 100644
--- a/lib/libc/amd64/sys/amd64_set_fsbase.c
+++ b/lib/libc/amd64/sys/amd64_set_fsbase.c
@@ -33,9 +33,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define IN_RTLD 1
+#define _WANT_P_OSREL
#include <sys/param.h>
-#undef IN_RTLD
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
#include <machine/sysarch.h>
diff --git a/lib/libc/amd64/sys/amd64_set_gsbase.c b/lib/libc/amd64/sys/amd64_set_gsbase.c
index c4880c126ae9..5ecde27f27f0 100644
--- a/lib/libc/amd64/sys/amd64_set_gsbase.c
+++ b/lib/libc/amd64/sys/amd64_set_gsbase.c
@@ -33,9 +33,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define IN_RTLD 1
+#define _WANT_P_OSREL
#include <sys/param.h>
-#undef IN_RTLD
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
#include <machine/sysarch.h>
diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c
index c7cf7bd58845..c9a2734853b6 100644
--- a/libexec/rtld-elf/amd64/reloc.c
+++ b/libexec/rtld-elf/amd64/reloc.c
@@ -33,6 +33,7 @@
* John Polstra <jdp@polstra.com>.
*/
+#define _WANT_P_OSREL
#include <sys/param.h>
#include <sys/mman.h>
#include <machine/cpufunc.h>
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c
index 7c637fe1d6ba..fb5854910ee2 100644
--- a/libexec/rtld-elf/map_object.c
+++ b/libexec/rtld-elf/map_object.c
@@ -27,6 +27,7 @@
* $FreeBSD$
*/
+#define _WANT_P_OSREL
#include <sys/param.h>
#include <sys/mman.h>
#include <sys/stat.h>
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index c5dc10f1c3b0..74329bdb9483 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -43,7 +43,7 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define IN_RTLD /* So we pickup the P_OSREL defines */
+#define _WANT_P_OSREL
#include <sys/param.h>
#include <sys/file.h>
#include <sys/mount.h>
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index a6c4ee60c2d5..6fc6a2475075 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3/95";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define IN_RTLD /* So we pickup the P_OSREL defines */
+#define _WANT_P_OSREL
#include <sys/param.h>
#include <sys/disklabel.h>
#include <sys/file.h>
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 5d97c0b2dffb..909ff0ef1d8b 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -78,7 +78,7 @@
#undef __FreeBSD_kernel__
#define __FreeBSD_kernel__
-#if defined(_KERNEL) || defined(IN_RTLD)
+#if defined(_KERNEL) || defined(_WANT_P_OSREL)
#define P_OSREL_SIGWAIT 700000
#define P_OSREL_SIGSEGV 700004
#define P_OSREL_MAP_ANON 800104