3 ms·
I this didn't lead to a "duplicate method definition" error by the linker. The more typical way I know for mocking/intercepting OS functions is using the -Wl,--
by Matthias247 6y ago
I this didn't lead to a "duplicate method definition" error by the linker. The more typical way I know for mocking/intercepting OS functions is using the -Wl,--wrap=clock_gettime linker flags [1] which allow to redirect calls to a __wrap_clock_gettime functions. But that doesn't seem to have been necessary here.
[1] https://drewdevault.com/2016/07/19/Using-Wl-wrap-for-mocking-in-C.html https://drewdevault.com/2016/07/19/Using-Wl-wrap-for-mocking...