summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/unixsupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/unixsupport.c')
-rw-r--r--otherlibs/unix/unixsupport.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/otherlibs/unix/unixsupport.c b/otherlibs/unix/unixsupport.c
index 2f79f906f..08942454b 100644
--- a/otherlibs/unix/unixsupport.c
+++ b/otherlibs/unix/unixsupport.c
@@ -298,3 +298,16 @@ void uerror(cmdname, cmdarg)
{
unix_error(errno, cmdname, cmdarg);
}
+
+value unix_freeze_buffer(buf)
+ value buf;
+{
+ if (Is_young(buf)) {
+ Push_roots(r, 1);
+ r[0] = buf;
+ minor_collection();
+ buf = r[0];
+ Pop_roots();
+ }
+ return buf;
+}