Description: <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.
 .
 gcl (2.6.12-119) unstable; urgency=medium
 .
   * Version_2.6.13pre119
Author: Camm Maguire <camm@debian.org>

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

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2022-07-31

--- gcl-2.6.12.orig/h/alpha-linux.h
+++ gcl-2.6.12/h/alpha-linux.h
@@ -20,3 +20,5 @@
 #define imb() __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory")
 #define CLEAR_CACHE imb()
 
+/*FIXME probe broken in recent kernels, no access*/
+#define DEFINED_REAL_MAXPAGE (1UL<<18) /*FIXME brk probe broken*/
--- gcl-2.6.12.orig/xgcl-2/sysdef.lisp
+++ gcl-2.6.12/xgcl-2/sysdef.lisp
@@ -41,14 +41,18 @@
 
 
 (defun compile-xgcl()
-  #+m68k(progn (trace si::readdir si::opendir si::closedir si::pathname-match-p)
-	       (print (directory "*.c"))
-	       (untrace si::readdir si::opendir si::closedir si::pathname-match-p))
+  #+(or m68k sh4)
+  (progn (trace si::readdir si::opendir si::closedir si::pathname-match-p)
+	 (print (directory "*.c"))
+	 (untrace si::readdir si::opendir si::closedir si::pathname-match-p))
   (mapc (lambda (x) 
 	  (let ((x (concatenate 'string compiler::*cc* " -I../h " (namestring x))))
 	    (unless (zerop (system x))
 	      (error "compile failure: ~s~%" x))))
-	(directory "*.c"))
+	(or (directory "*.c")
+	    #+(or m68k sh4)
+	    (progn (print "qemu/readdir issue still present")
+		   (mapcar (lambda (x) (truename (merge-pathnames ".c" x))) '("XStruct-4" "general-c" "Xutil-2" "Events" "XStruct-2")))))
   (mapc (lambda (x)
 	  (compile-file (format nil "~a.lsp" x) :system-p t)) *files*))
 
