[LTP] [PATCH] getdents: Fix build under glibc 2.30

Petr Vorel pvorel@suse.cz
Tue Oct 8 13:02:43 CEST 2019


Hi Cyril,

> > glibc commit b8b3d5a14e ("Linux: Move getdents64 to <dirent.h>")
> > moved the declaration from <unistd.h> to <dirent.h> to match the
> > location of the declaration in musl.

> > Thus we need to include both <dirent.h> and <unistd.h> for getdents64().

> > Using getdents64() declaration requires on both glibc and musl
> > _GNU_SOURCE definition, thus move it to to getdents.h.

> I would rather go for _GNU_SOURCE being defined in the testcases rather
> than hiding it in the getdenst.h header and depending on the order.

> Other than that it's fine.

Make sense. Thanks for a review, merged with this change.

Kind regards,
Petr


More information about the ltp mailing list