From 797164f75b91c5cdfb68fc91d6853e7609d97e12 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 6 Mar 2025 17:21:10 -0700 Subject: Add libfmt to bypass output buffering for libmisc:assert --- libmisc/intercept.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libmisc/intercept.c') 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 + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -19,6 +19,15 @@ int __lm_printf(const char *format, ...) { return ret; } +[[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(); -- cgit v1.2.3-2-g168b