I’m using CoreELEC 20.1 on S903X3. While I was trying to troubleshoot why I cannot play games on amiga uae emulator in hdf format I discovered very wierd fseek behaviour when calling with SEEK_END .
#include <stdio.h>
#include <errno.h>
int main() {
int ret;
FILE *h2 = fopen("some file", "r+b");
ret = fseeko(h2, 0, SEEK_END);
printf("TEST %d - err=%d\n", ret, errno);
}
I compiled it with exactly the same compile options as the puae addon (the only difference is the resulting binary is executable instead of shared lib). This test program runs as expected.
Then I put exaclty the same code into the puae emulator shared library and ran the addon. The result is very wierd. ret variable value (result of fseeko) is the opened file size ! and the errno is 2 (may be not related to the fseeko call ?)