added functions to platform-nix.c