[Ohrrpgce] SVN: teeemcee/11575 Fix fcntl wrappers in glibc_compat.c, which entered an infinite loop if

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Sat Jan 18 03:14:39 PST 2020


teeemcee
2020-01-18 03:14:39 -0800 (Sat, 18 Jan 2020)
802
Fix fcntl wrappers in glibc_compat.c, which entered an infinite loop if actually called!

__wrap_fcntl64 was simply calling itself because I forgot that trying to call
fcntl will actually call fcntl64, and didn't override fcntl64.

The reason noone had noticed is that they are only called (on Unix) when
compiling with scons portable=1, which also links to libncurses.so.5 instead of
libncurses.so.6. But all of us are using machines which have libncurses.so.6. It
turns out that using headers for the .6 ABI and .so for the .5 ABI doesn't work,
causing FB's hInit() startup code to skip the rest of fb_hInitConsole(), and
with it, all the calls to fcntl.

This also explains why waitforkey is broken in commandline programs compiled
with portable=1. Linking to libncurses.so.5 is wrong, wrong, wrong.
---
U   wip/lib/glibc_compat.c


More information about the Ohrrpgce mailing list