rtld: Switch to using <assert.h> for assert

The stock assert() works because rtld-libc includes a custom
implementation of __assert().

Reviewed by:	imp, kib
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D54712
This commit is contained in:
John Baldwin
2026-01-14 12:10:33 -05:00
parent e96ec1a1eb
commit 3ea97c9de2
+1 -4
View File
@@ -33,7 +33,7 @@
#define DEBUG_H 1
#include <sys/cdefs.h>
#include <assert.h>
#include <string.h>
#include "rtld_paths.h"
#include "rtld_printf.h"
@@ -47,9 +47,6 @@ extern int debug;
#define dbg(...) ((void) 0)
#endif
#define assert(cond) ((cond) ? (void) 0 : \
(msg(_BASENAME_RTLD ": assert failed: " __FILE__ ":" \
__XSTRING(__LINE__) "\n"), abort()))
#define msg(s) rtld_putstr(s)
#define trace() msg(_BASENAME_RTLD ": " __XSTRING(__LINE__) "\n")