From fd5e6c367a5755740aeffa00df4db26c772159e6 Mon Sep 17 00:00:00 2001 From: schneider <schneider@blinkenlichts.net> Date: Wed, 17 Jul 2019 20:09:52 +0200 Subject: [PATCH] fix(ff13): properly define the weak functions --- lib/ff13/Source/ff.h | 8 ++++---- lib/ff13/Source/ffsystem.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ff13/Source/ff.h b/lib/ff13/Source/ff.h index 85beeb6d..7ee117b7 100644 --- a/lib/ff13/Source/ff.h +++ b/lib/ff13/Source/ff.h @@ -311,10 +311,10 @@ void ff_memfree (void* mblock); /* Free memory block */ /* Sync functions */ #if FF_FS_REENTRANT -int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj) __attribute__((weak)); /* Create a sync object */ -int ff_req_grant (FF_SYNC_t sobj) __attribute__((weak)); /* Lock sync object */ -void ff_rel_grant (FF_SYNC_t sobj) __attribute__((weak)); /* Unlock sync object */ -int ff_del_syncobj (FF_SYNC_t sobj) __attribute__((weak)); /* Delete a sync object */ +int ff_cre_syncobj (BYTE vol, FF_SYNC_t* sobj); /* Create a sync object */ +int ff_req_grant (FF_SYNC_t sobj); /* Lock sync object */ +void ff_rel_grant (FF_SYNC_t sobj); /* Unlock sync object */ +int ff_del_syncobj (FF_SYNC_t sobj); /* Delete a sync object */ #endif diff --git a/lib/ff13/Source/ffsystem.c b/lib/ff13/Source/ffsystem.c index 7dfafc21..39b224d6 100644 --- a/lib/ff13/Source/ffsystem.c +++ b/lib/ff13/Source/ffsystem.c @@ -53,7 +53,7 @@ void ff_memfree ( static int s_notAMutex; -int ff_cre_syncobj ( /* 1:Function succeeded, 0:Could not create the sync object */ +__attribute__((weak)) int ff_cre_syncobj ( /* 1:Function succeeded, 0:Could not create the sync object */ BYTE vol, /* Corresponding volume (logical drive number) */ FF_SYNC_t *sobj /* Pointer to return the created sync object */ ) @@ -72,7 +72,7 @@ int ff_cre_syncobj ( /* 1:Function succeeded, 0:Could not create the sync object / the f_mount() function fails with FR_INT_ERR. */ -int ff_del_syncobj ( /* 1:Function succeeded, 0:Could not delete due to an error */ +__attribute__((weak)) int ff_del_syncobj ( /* 1:Function succeeded, 0:Could not delete due to an error */ FF_SYNC_t sobj /* Sync object tied to the logical drive to be deleted */ ) { @@ -88,7 +88,7 @@ int ff_del_syncobj ( /* 1:Function succeeded, 0:Could not delete due to an error / When a 0 is returned, the file function fails with FR_TIMEOUT. */ -int ff_req_grant ( /* 1:Got a grant to access the volume, 0:Could not get a grant */ +__attribute__((weak)) int ff_req_grant ( /* 1:Got a grant to access the volume, 0:Could not get a grant */ FF_SYNC_t sobj /* Sync object to wait */ ) { @@ -103,7 +103,7 @@ int ff_req_grant ( /* 1:Got a grant to access the volume, 0:Could not get a gran /* This function is called on leaving file functions to unlock the volume. */ -void ff_rel_grant ( +__attribute__((weak)) void ff_rel_grant ( FF_SYNC_t sobj /* Sync object to be signaled */ ) { -- GitLab