removed apue.h dependency