From 448f08b685e880f472790ad96ad35c19851ef481 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Mon, 17 Jun 2024 15:32:12 +0200 Subject: vppinfra: export os_exit and os_puts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit os_exit() and os_puts() are not exported, preventing linkage with libvppinfra if those are not defined. Type: fix Change-Id: I7e3b583147e1348f078afeac3f793fe150405009 Signed-off-by: Benoît Ganne --- src/vppinfra/unix-misc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/vppinfra/unix-misc.c b/src/vppinfra/unix-misc.c index 31c0a489e8d..af48e99ebe6 100644 --- a/src/vppinfra/unix-misc.c +++ b/src/vppinfra/unix-misc.c @@ -219,27 +219,20 @@ unix_proc_file_contents (char *file, u8 ** result) return 0; } -void os_panic (void) __attribute__ ((weak)); - -__clib_export void +__clib_export __clib_weak void os_panic (void) { abort (); } -void os_exit (int) __attribute__ ((weak)); - -void +__clib_export __clib_weak void os_exit (int code) { exit (code); } -void os_puts (u8 * string, uword string_length, uword is_error) - __attribute__ ((weak)); - -void -os_puts (u8 * string, uword string_length, uword is_error) +__clib_export __clib_weak void +os_puts (u8 *string, uword string_length, uword is_error) { int cpu = os_get_thread_index (); int nthreads = os_get_nthreads (); -- cgit 1.2.3-korg