vppinfra: export os_exit and os_puts 51/41151/1
authorBenoît Ganne <[email protected]>
Mon, 17 Jun 2024 13:32:12 +0000 (15:32 +0200)
committerBenoît Ganne <[email protected]>
Mon, 17 Jun 2024 13:36:28 +0000 (15:36 +0200)
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 <[email protected]>
src/vppinfra/unix-misc.c

index 31c0a48..af48e99 100644 (file)
@@ -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 ();