summary refs log tree commit diff stats
path: root/lib/system/sysio.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-02-08 22:42:48 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-02-08 22:42:48 +0100
commit52c38f85355c379f08c4e4d074778de6788d96cb (patch)
treeb3b3d383afd45b39cca4fe9752f5520d9d6e751e /lib/system/sysio.nim
parentd23eb798492798caad8dc8ee766e41972f535745 (diff)
downloadNim-52c38f85355c379f08c4e4d074778de6788d96cb.tar.gz
make tests green again
Diffstat (limited to 'lib/system/sysio.nim')
-rw-r--r--lib/system/sysio.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim
index e8ff6a35d..9f4944eb0 100644
--- a/lib/system/sysio.nim
+++ b/lib/system/sysio.nim
@@ -37,6 +37,10 @@ proc c_clearerr(f: File) {.
 proc c_feof(f: File): cint {.
   importc: "feof", header: "<stdio.h>".}
 
+when not declared(c_fwrite):
+  proc c_fwrite(buf: pointer, size, n: csize, f: File): cint {.
+    importc: "fwrite", header: "<stdio.h>".}
+
 # C routine that is used here:
 proc c_fread(buf: pointer, size, n: csize, f: File): csize {.
   importc: "fread", header: "<stdio.h>", tags: [ReadIOEffect].}