dirfd from gnulib?
Gregory Fong <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CADtm3G5bUJs1Fd2oMUJeU2iOO7me6EfCEvVjD3vXRY0dT=ke=w@mail.gmail.com> |
Hello, I'm building gdb using lsbcc from the LSB SDK to target the LSB 3.0 spec, and gdb 7.7 refuses to build because commit 614c279dda95dd69c3c14778fc600f4a265847d6 assumes that the function dirfd (declared in <dirent.h>) exists in fdwalk in gdb/common/filestuff.c. However, dirfd wasn't added until LSB 4.0. Now, I recognize that dirfd is present in POSIX.1-2008, and has been available in most distros for some time before that, so most people can reasonably expect it to be present. However, there are practical reasons to target LSB 3.0, such as the guarantee that your binary will work on a large variety of distributions including Red Hat 4 which is still in extended support. I've re-imported gnulib with the dirfd module (eliding errno) and can send a patch if this would be of interest---not sure if being able to build to target LSB 3.0 is a desired feature, but if is, let me know. Best regards, Gregory