core: fix some #includes to be posix compliant
sys/poll.h and sys/fcntl.h are GNUisms and might not exist on
strictly posix compliant systems. This fixes to use the posix
specified standard locations of these headers.
E.g musl c-library will give warnings on using these non-standard
glibc 'internal' headers.