summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-03-21 21:24:00 +0100
committerAraq <rumpf_a@web.de>2015-03-22 01:38:13 +0100
commit1681800d3c7a923321ca130a29b535311e587323 (patch)
tree3ca6ea9d6c012fd3aa56dc8aa2ee1008d46cf867
parenta32237a0117321636b062ae5b1e0d96ff1f95979 (diff)
downloadNim-1681800d3c7a923321ca130a29b535311e587323.tar.gz
fixes #2116
-rw-r--r--lib/posix/posix.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim
index 7d3e3ddba..ced966207 100644
--- a/lib/posix/posix.nim
+++ b/lib/posix/posix.nim
@@ -94,10 +94,11 @@ type
   Tdirent* {.importc: "struct dirent",
              header: "<dirent.h>", final, pure.} = object ## dirent_t struct
     d_ino*: Tino  ## File serial number.
-    d_off*: TOff  ## Not an offset. Value that ``telldir()`` would return.
-    d_reclen*: cshort ## Length of this record. (not POSIX)
-    d_type*: int8 ## Type of file; not supported by all filesystem types.
-                  ## (not POSIX)
+    when defined(linux):
+      d_off*: TOff  ## Not an offset. Value that ``telldir()`` would return.
+      d_reclen*: cshort ## Length of this record. (not POSIX)
+      d_type*: int8 ## Type of file; not supported by all filesystem types.
+                    ## (not POSIX)
     d_name*: array [0..255, char] ## Name of entry.
 
   Tflock* {.importc: "struct flock", final, pure,