src/tools.c: fix compilation on Windows
authorAntonio Ospite <ao2@ao2.it>
Mon, 26 Feb 2018 14:50:53 +0000 (15:50 +0100)
committerAntonio Ospite <ao2@ao2.it>
Tue, 27 Feb 2018 16:19:00 +0000 (17:19 +0100)
commit166a6f789ccde8f6c96da43d4c3390d054a03115
tree0cc19d6dd8f574b0c1450e86fefa98106d647598
parent952989bf287cbc37b28832c08a3d439ccacb6db6
src/tools.c: fix compilation on Windows

On Windows nanosleep() is not available and compiling fails with the
following error:

  CMakeFiles/am7xxx.dir/objects.a(tools.c.obj):tools.c:(.text+0x4a): undefined reference to `nanosleep'
  collect2: error: ld returned 1 exit status
  make[2]: *** [src/CMakeFiles/am7xxx.dir/build.make:153: lib/libam7xxx.dll] Error 1
  make[1]: *** [CMakeFiles/Makefile2:189: src/CMakeFiles/am7xxx.dir/all] Error 2
  make: *** [Makefile:130: all] Error 2

Using the native Windows function Sleep() fixes the error.
src/tools.c