summaryrefslogtreecommitdiff
path: root/libmisc/intercept.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-06 17:21:10 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-02 20:44:53 -0600
commit797164f75b91c5cdfb68fc91d6853e7609d97e12 (patch)
treea136f9273d6ed8c85d31a8d0b9c1d80234b3fb17 /libmisc/intercept.c
parentece605ec021de84aa1a9e282f342c38505ba794b (diff)
Add libfmt to bypass output buffering for libmisc:assert
Diffstat (limited to 'libmisc/intercept.c')
-rw-r--r--libmisc/intercept.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libmisc/intercept.c b/libmisc/intercept.c
index dda8c09..85a3801 100644
--- a/libmisc/intercept.c
+++ b/libmisc/intercept.c
@@ -1,6 +1,6 @@
/* libmisc/intercept.c - Interceptable ("weak") functions
*
- * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
+ * Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
@@ -20,6 +20,15 @@ int __lm_printf(const char *format, ...) {
}
[[gnu::weak]]
+int __lm_light_printf(const char *format, ...) {
+ va_list va;
+ va_start(va, format);
+ int ret = vprintf(format, va);
+ va_end(va);
+ return ret;
+}
+
+[[gnu::weak]]
void __lm_abort(void) {
abort();
}