unistd.h should be included before fcntl.h under linux (I guess)