Fix portability problems with glibc 2.0, as reported in #449157.
7 files changed