From 89abef408f02e463cfe9d462fa10be64a94b3b36 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 3 Nov 2014 01:53:17 +0100 Subject: Fix optional definitions in static binaries * libcons/extra-version.c (cons_extra_version): Add weak attribute. * libcons/vcons-add.c (cons_vcons_add): Likewise. * libcons/vcons-remove.c (cons_vcons_remove): Likewise. * libdiskfs/extra-version.c (diskfs_extra_version): Likewise. * libdiskfs/get-source.c (diskfs_get_source): Likewise. * libdiskfs/readonly-changed.c (diskfs_readonly_changed): Likewise. * libdiskfs/sync-default.c (diskfs_default_sync_interval): Likewise. * libdiskfs/validate-author.c (diskfs_validate_author_change): Likewise. * libdiskfs/validate-flags.c (diskfs_validate_flags_change): Likewise. * libdiskfs/validate-group.c (diskfs_validate_group_change): Likewise. * libdiskfs/validate-mode.c (diskfs_validate_mode_change): Likewise. * libdiskfs/validate-owner.c (diskfs_validate_owner_change): Likewise. * libdiskfs/validate-rdev.c (diskfs_validate_rdev_change): Likewise. * libnetfs/file-get-storage-info-default.c (netfs_file_get_storage_info): Likewise. * libnetfs/get-source.c (netfs_get_source): Likewise. * libnetfs/set-get-trans.c (netfs_set_translator, netfs_get_translator): Likewise. * libtrivfs/get-source.c (trivfs_get_source): Likewise. --- libnetfs/file-get-storage-info-default.c | 2 +- libnetfs/get-source.c | 2 +- libnetfs/set-get-trans.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libnetfs') diff --git a/libnetfs/file-get-storage-info-default.c b/libnetfs/file-get-storage-info-default.c index 0ca68c96..4339c7bc 100644 --- a/libnetfs/file-get-storage-info-default.c +++ b/libnetfs/file-get-storage-info-default.c @@ -23,7 +23,7 @@ #include -error_t +error_t __attribute__ ((weak)) netfs_file_get_storage_info (struct iouser *cred, struct node *np, mach_port_t **ports, diff --git a/libnetfs/get-source.c b/libnetfs/get-source.c index 73e48be8..5a234bce 100644 --- a/libnetfs/get-source.c +++ b/libnetfs/get-source.c @@ -21,7 +21,7 @@ #include "priv.h" -error_t +error_t __attribute__ ((weak)) netfs_get_source (struct protid *cred, char *source, size_t source_len) { return EOPNOTSUPP; diff --git a/libnetfs/set-get-trans.c b/libnetfs/set-get-trans.c index b58668d8..c0a4370e 100644 --- a/libnetfs/set-get-trans.c +++ b/libnetfs/set-get-trans.c @@ -28,7 +28,7 @@ /* The user may define this function. Attempt to set the passive translator record for FILE to ARGZ (of length ARGZLEN) for user CRED. */ -error_t +error_t __attribute__ ((weak)) netfs_set_translator (struct iouser *cred, struct node *np, char *argz, size_t argzlen) { @@ -40,7 +40,7 @@ netfs_set_translator (struct iouser *cred, struct node *np, mode, look up the name of its translator. Store the name into newly malloced storage, and return it in *ARGZ; set *ARGZ_LEN to the total length. */ -error_t +error_t __attribute__ ((weak)) netfs_get_translator (struct node *node, char **argz, size_t *argz_len) { return EOPNOTSUPP; -- cgit v1.2.3