mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-26 00:30:05 -04:00
Merge branch '1044-include-config.h-in-gen.c-v9_14' into 'v9_14'
Resolve "gen fails to generate headers on Debian buster" See merge request isc-projects/bind9!1976
This commit is contained in:
commit
bdae8ed097
2 changed files with 15 additions and 2 deletions
|
|
@ -167,9 +167,14 @@ include/dns/rdatastruct.h: gen \
|
||||||
code.h: gen
|
code.h: gen
|
||||||
./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; }
|
./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; }
|
||||||
|
|
||||||
|
gen: LFS_CFLAGS = `getconf LFS_CFLAGS 2>/dev/null`
|
||||||
|
gen: LFS_LDFLAGS = `getconf LFS_LDFLAGS 2>/dev/null`
|
||||||
|
gen: LFS_LIBS = `getconf LFS_LIBS 2>/dev/null`
|
||||||
gen: gen.c
|
gen: gen.c
|
||||||
${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
|
${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
|
||||||
${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
|
${LFS_CFLAGS} ${LFS_LDFLAGS} \
|
||||||
|
${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \
|
||||||
|
${BUILD_LIBS} ${LFS_LIBS}
|
||||||
|
|
||||||
timestamp: include libdns.@A@
|
timestamp: include libdns.@A@
|
||||||
touch timestamp
|
touch timestamp
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,10 @@
|
||||||
|
|
||||||
#include <sys/types.h> /* Required on some systems for dirent.h. */
|
#include <sys/types.h> /* Required on some systems for dirent.h. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h> /* XXXDCL Required for ?. */
|
#include <unistd.h> /* XXXDCL Required for ?. */
|
||||||
|
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
|
|
@ -66,9 +68,15 @@ next_file(isc_dir_t *dir) {
|
||||||
dir->filename = NULL;
|
dir->filename = NULL;
|
||||||
|
|
||||||
if (dir->handle != NULL) {
|
if (dir->handle != NULL) {
|
||||||
|
errno = 0;
|
||||||
dirent = readdir(dir->handle);
|
dirent = readdir(dir->handle);
|
||||||
if (dirent != NULL)
|
if (dirent != NULL) {
|
||||||
dir->filename = dirent->d_name;
|
dir->filename = dirent->d_name;
|
||||||
|
} else {
|
||||||
|
if (errno != 0) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dir->filename != NULL)
|
if (dir->filename != NULL)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue