diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2017-08-12 15:18:17 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2017-08-12 15:18:17 +0000 |
| commit | 25b73e6327d203d869442fd3991c9531b96d51ae (patch) | |
| tree | 10347da31c183857e366382ea1eb05e7d2cd24bc /lib/libc/stdlib | |
| parent | 6fe9e5b8219a9504e6206be82a3175cbab4add50 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/set_constraint_handler_s.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/stdlib/set_constraint_handler_s.c b/lib/libc/stdlib/set_constraint_handler_s.c index dafdb16528be6..d2d06b8093882 100644 --- a/lib/libc/stdlib/set_constraint_handler_s.c +++ b/lib/libc/stdlib/set_constraint_handler_s.c @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include <pthread.h> #include <stddef.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #include "un-namespace.h" #include "libc_private.h" @@ -81,10 +83,14 @@ __throw_constraint_handler_s(const char * restrict msg, errno_t error) } void -abort_handler_s(const char * restrict msg __unused, - void * restrict ptr __unused, errno_t error __unused) +abort_handler_s(const char * restrict msg, void * restrict ptr __unused, + errno_t error __unused) { + static const char ahs[] = "abort_handler_s : "; + (void) _write(STDERR_FILENO, ahs, sizeof(ahs) - 1); + (void) _write(STDERR_FILENO, msg, strlen(msg)); + (void) _write(STDERR_FILENO, "\n", 1); abort(); } |
