<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
committerCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
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
configure.in

index 281ca4101dfdee284f9f2495201da664d79f5f1d..1a7939acb39a8cb2b8cd7e545074b944710641f8 100755 (executable)
--- a/configure
+++ b/configure
@@ -7630,13 +7630,16 @@ else $as_nop
 /* end confdefs.h.  */
 
                                 #include <dirent.h>
+                                #include <string.h>
 
 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;
index cec399327048b367faf1ca01d921af5352f3205f..16260541e681d342552c28b44a7327d5689cde2b 100644 (file)
@@ -1495,10 +1495,13 @@ AC_CHECK_HEADERS([dirent.h],
                     [AC_LANG_PROGRAM(
                             [[
                                 #include <dirent.h>
+                                #include <string.h>
                             ]],
                             [[
-                                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])))