Make os-oriented functions independent

Signed-off-by: nonki7777 <nonki7777@gmail.com>