mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use rtld_putstr() instead of write() for the rtld msg() macro
This removes an unnecessary libc dependency from rtld. See https://reviews.freebsd.org/D20663 for more details.
This commit is contained in:
parent
df5e392483
commit
e69dc8626a
2 changed files with 3 additions and 2 deletions
|
|
@ -37,7 +37,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "rtld_printf.h"
|
||||
|
||||
void debug_printf(const char *, ...) __printflike(1, 2);
|
||||
extern int debug;
|
||||
|
|
@ -57,7 +57,7 @@ extern int debug;
|
|||
#define assert(cond) ((cond) ? (void) 0 : \
|
||||
(msg(_MYNAME ": assert failed: " __FILE__ ":" \
|
||||
__XSTRING(__LINE__) "\n"), abort()))
|
||||
#define msg(s) write(STDOUT_FILENO, s, strlen(s))
|
||||
#define msg(s) rtld_putstr(s)
|
||||
#define trace() msg(_MYNAME ": " __XSTRING(__LINE__) "\n")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#define RTLD_PRINTF_H 1
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int rtld_snprintf(char *buf, size_t bufsize, const char *fmt, ...)
|
||||
|
|
|
|||
Loading…
Reference in a new issue