Using Dart FFI I'm trying to dynamically load the linux/posix 'stat' function.
I've assumed that the function is in the libc.so.6 library but when I attempt to load it I get the error:
Invalid argument(s): Failed to lookup symbol (/lib/x86_64-linux-gnu/libc.so.6: undefined symbol: stat)
I'm successfully loading other functions from the libc.so.6 library so my dynamic loading technique is working correctly.
I have two theories:
- stat is a macro for xstat and as such stat no longer exists.
- stat is in another library that I've not been able to groc.
Ideally I want to use stat rather than xstat as I need this code to also work on osx which as far as I can tell doesn't support xstat. Help?