From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camm Maguire <camm@debian.org>
Date: Jun, 23 2026 22:39:34 +0000
Subject: [PATCH] <short summary of the 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.

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-<Vendor>: <vendor-bugtracker-url>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>

--- gcl27-2.7.1.orig/git.tag
+++ gcl27-2.7.1/git.tag
@@ -1 +1 @@
-"Version_2_7_2pre30"
+"Version_2_7_2pre31"
--- gcl27-2.7.1.orig/h/pool.h
+++ gcl27-2.7.1/h/pool.h
@@ -111,16 +111,20 @@ open_pool(void) {
 void
 close_pool(void) {
 
+  static int no_recur;
+
 #ifndef NO_FILE_LOCKING
-  if (pool!=-1) {
+  if (pool!=-1 && !no_recur) {
+    no_recur=1;
     f.l_type=F_WRLCK;
     if (!fcntl(pool,F_SETLK,&f))
       massert(!unlink(gcl_pool) || errno==ENOENT);
     register_pool(-1);
-    massert(!close(pool));
     massert(!munmap(Pool,sizeof(struct pool)));
+    massert(!close(pool));
     pool=-1;
     memset(gcl_pool,0,sizeof(gcl_pool));
+    no_recur=0;
   }
 #endif
   
--- gcl27-2.7.1.orig/o/disable_aslr.c
+++ gcl27-2.7.1/o/disable_aslr.c
@@ -132,6 +132,14 @@ disable_aslr(int argc, char **argv, char
   }
 
 }
+
+#else  /*Unneeded on Hurd, cygwin/mingw via coff header flag*/
+
+void
+disable_aslr(int argc, char **argv, char **envp) {
+  return;
+}
+
 #endif
 
 #endif
