rtissera / libchdr

Standalone library for reading MAME's CHDv1-v5 formats.
BSD 3-Clause "New" or "Revised" License
98 stars 42 forks source link

building on armhf: implicit declaration of function ‘ftello64’; did you mean ‘ftello’? #117

Open a-detiste opened 6 months ago

a-detiste commented 6 months ago

Hi,

This is some fallout from the time64 rebuild in Debian with -Werror=implicit-function-declaration

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069527

I can certainly fix it in some ugly way, I 'll have a look later.

I guess the same bug can be reproduced on a i386 chroot with the right compilation flags.

https://www.gnu.org/software/libc/manual/html_node/File-Positioning.html#index-ftello

https://lwn.net/Articles/938149/

a-detiste commented 6 months ago

If the sources are compiled with _FILE_OFFSET_BITS == 64 on a 32 bits machine this function is available under the name fseeko

invertego commented 6 months ago

This is related to another open issue; I've documented the problems with libchdr's attempts to detect the compilation environment here: https://github.com/rtissera/libchdr/issues/92#issuecomment-1534074775