From: Benoît Ganne Date: Mon, 17 Jun 2024 13:32:12 +0000 (+0200) Subject: vppinfra: export os_exit and os_puts X-Git-Tag: v25.02-rc0~183 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F41151%2F1;p=vpp.git vppinfra: export os_exit and os_puts 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 --- 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 ();