From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camm Maguire <camm@debian.org>
Date: Oct, 06 2026 13:08:15 +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.

Bug-Debian: https://bugs.debian.org/1148683
---
The information above should follow the Patch Tagging Guidelines,
see 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>

--- fricas-1.3.13.orig/src/lib/cfuns-c.c
+++ fricas-1.3.13/src/lib/cfuns-c.c
@@ -286,6 +286,9 @@ remove_directory(char * name)
             perror("Unlink failed");
         }
 #else
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif       
         char pathbuf[PATH_MAX];
         if (strlen(flst->file) + name_len + 1 < PATH_MAX) {
 	  snprintf(pathbuf,sizeof(pathbuf),"%s/%s",name,flst->file);
