From 28da04c1f7336a4eecc22e3eaa85cb9fe1b30e77 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 30 Aug 2017 13:33:09 +0200 Subject: [PATCH] Android support: put Termux specific dependencies behind a -d:termux switch --- config/nim.cfg | 2 +- lib/posix/posix_other.nim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index 602f96c987..821b160490 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -90,7 +90,7 @@ path="$lib/pure" @end @end -@if android: +@if android and termux: cc = clang gcc.options.linker = "-landroid-glob" gcc.cpp.options.linker = "-landroid-glob" diff --git a/lib/posix/posix_other.nim b/lib/posix/posix_other.nim index 7738d710cc..69f6acfb8f 100644 --- a/lib/posix/posix_other.nim +++ b/lib/posix/posix_other.nim @@ -15,7 +15,7 @@ const hasSpawnH = not defined(haiku) # should exist for every Posix system nowadays hasAioH = defined(linux) -when defined(linux): +when defined(linux) and not defined(android): # On Linux: # timer_{create,delete,settime,gettime}, # clock_{getcpuclockid, getres, gettime, nanosleep, settime} lives in librt @@ -46,7 +46,7 @@ type d_ino*: Ino ## File serial number. when defined(dragonfly): # DragonflyBSD doesn't have `d_reclen` field. - d_type*: uint8 + d_type*: uint8 elif defined(linux) or defined(macosx) or defined(freebsd) or defined(netbsd) or defined(openbsd) or defined(genode): d_reclen*: cshort ## Length of this record. (not POSIX)