summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/write.c')
-rw-r--r--otherlibs/unix/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/otherlibs/unix/write.c b/otherlibs/unix/write.c
index 99ab72131..db7ab276c 100644
--- a/otherlibs/unix/write.c
+++ b/otherlibs/unix/write.c
@@ -18,6 +18,7 @@ value unix_write(fd, buf, ofs, len) /* ML */
value fd, buf, ofs, len;
{
int ret;
+ buf = unix_freeze_buffer(buf);
enter_blocking_section();
ret = write(Int_val(fd), &Byte(buf, Long_val(ofs)), Int_val(len));
leave_blocking_section();