This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
dirfd from gnulib?
- From: Gregory Fong <gregory dot 0xf0 at gmail dot com>
- To: gdb at sourceware dot org
- Cc: tromey at redhat dot com
- Date: Wed, 12 Feb 2014 18:55:18 -0800
- Subject: dirfd from gnulib?
- Authentication-results: sourceware.org; auth=none
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