Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force resolution of fstat64 symbol with JNA (elastic#110807)
When JNA loads libraries it creates a proxy object for the library. Unfortunately it doesn't actually inspect any of the methods, those get bound lazily at runtime when the method is called through the proxy. For fstat64 we need to know at load time whether the symbol exists, so that we can fallback to an alternate function if it doesn't. This commit looks up the NativeLibrary object from JNA for libc and checks if fstat64 exists during load time.
- Loading branch information