From 267995f0c2aea8030c6126f62dc41ff63d80caa7 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 30 Oct 2016 21:15:47 +0100 Subject: Mark library stubs as weak So that static linking of e.g. console.static can work. * libdiskfs/io-stubs.c (diskfs_S_io_readsleep, diskfs_S_io_eofnotify, diskfs_S_io_postnotify, diskfs_S_io_readnotify): Mark weak. * libnetfs/fsstubs.c (netfs_S_file_notice_changes, netfs_S_file_getfh, netfs_S_ifsock_getsockaddr): Likewise. * libnetfs/fsysstubs.c (netfs_S_fsys_getfile: netfs_S_fsys_getpriv, netfs_S_fsys_init, netfs_S_fsys_forward, netfs_S_fsys_startup): Likewise. * libpager/stubs.c (_pager_S_memory_object_copy, _pager_S_memory_object_data_write, _pager_S_memory_object_supply_completed): Likewise. * libtrivfs/fsys-stubs.c (trivfs_S_fsys_startup, trivfs_S_fsys_getpriv, trivfs_S_fsys_init, trivfs_S_fsys_getfile): Likewise. * libtrivfs/io-stubs.c (trivfs_S_io_map_cntl, trivfs_S_io_get_conch, trivfs_S_io_release_conch, trivfs_S_io_eofnotify, trivfs_S_io_prenotify, trivfs_S_io_postnotify, trivfs_S_io_readsleep, trivfs_S_io_sigio, trivfs_S_io_readnotify): Likewise. --- libtrivfs/fsys-stubs.c | 8 ++++---- libtrivfs/io-stubs.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'libtrivfs') diff --git a/libtrivfs/fsys-stubs.c b/libtrivfs/fsys-stubs.c index 313328ab..44d411cc 100644 --- a/libtrivfs/fsys-stubs.c +++ b/libtrivfs/fsys-stubs.c @@ -22,7 +22,7 @@ #include "priv.h" #include "trivfs_fsys_S.h" -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_fsys_startup (mach_port_t bootport, mach_port_t reply, mach_msg_type_name_t replytype, @@ -34,7 +34,7 @@ trivfs_S_fsys_startup (mach_port_t bootport, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_fsys_getpriv (struct trivfs_control *cntl, mach_port_t reply, mach_msg_type_name_t replytype, @@ -45,7 +45,7 @@ trivfs_S_fsys_getpriv (struct trivfs_control *cntl, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_fsys_init (struct trivfs_control *control, mach_port_t reply, mach_msg_type_name_t replytype, @@ -55,7 +55,7 @@ trivfs_S_fsys_init (struct trivfs_control *control, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_fsys_getfile (struct trivfs_control *cntl, mach_port_t reply, mach_msg_type_name_t replytype, diff --git a/libtrivfs/io-stubs.c b/libtrivfs/io-stubs.c index ab6b1b32..1686f3f9 100644 --- a/libtrivfs/io-stubs.c +++ b/libtrivfs/io-stubs.c @@ -22,7 +22,7 @@ #include "priv.h" #include "trivfs_io_S.h" -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_map_cntl (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype, @@ -32,7 +32,7 @@ trivfs_S_io_map_cntl (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_get_conch (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype) @@ -40,7 +40,7 @@ trivfs_S_io_get_conch (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_release_conch (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype) @@ -48,7 +48,7 @@ trivfs_S_io_release_conch (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_eofnotify (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype) @@ -56,7 +56,7 @@ trivfs_S_io_eofnotify (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_prenotify (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype, @@ -66,7 +66,7 @@ trivfs_S_io_prenotify (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_postnotify (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype, @@ -76,7 +76,7 @@ trivfs_S_io_postnotify (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_readsleep (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype) @@ -84,7 +84,7 @@ trivfs_S_io_readsleep (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_sigio (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype) @@ -92,7 +92,7 @@ trivfs_S_io_sigio (struct trivfs_protid *cred, return EOPNOTSUPP; } -kern_return_t +kern_return_t __attribute__((weak)) trivfs_S_io_readnotify (struct trivfs_protid *cred, mach_port_t reply, mach_msg_type_name_t replytype) -- cgit v1.2.3