From 956ff24f04045159a0fd4d00fa18b55e39d5bd3a Mon Sep 17 00:00:00 2001 From: Camm Maguire Date: Thu, 11 Aug 2022 18:16:42 +0100 Subject: [PATCH] TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. gcl (2.6.12-117) unstable; urgency=medium * Version_2.6.13pre114 Gbp-Pq: Name Version_2.6.13pre114 --- configure | 7 +++++-- configure.in | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 281ca41..1a7939a 100755 --- a/configure +++ b/configure @@ -7630,13 +7630,16 @@ else $as_nop /* end confdefs.h. */ #include + #include int main (void) { - struct dirent d; - return d.d_type=0; + struct dirent *d; + DIR *r=opendir("./"); + for (;(d=readdir(r)) && strcmp("configure",d->d_name);); + return d && d->d_type==DT_REG ? 0 : -1; ; return 0; diff --git a/configure.in b/configure.in index cec3993..1626054 100644 --- a/configure.in +++ b/configure.in @@ -1495,10 +1495,13 @@ AC_CHECK_HEADERS([dirent.h], [AC_LANG_PROGRAM( [[ #include + #include ]], [[ - struct dirent d; - return d.d_type=0; + struct dirent *d; + DIR *r=opendir("./"); + for (;(d=readdir(r)) && strcmp("configure",d->d_name);); + return d && d->d_type==DT_REG ? 0 : -1; ]])], [AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_D_TYPE,1,[have struct dirent d_type field])], AC_MSG_RESULT([no]),AC_MSG_RESULT([no]))) -- 2.30.2