Unfortunately the function fcntl() is not implemented by the Altera HAL. The Altera HAL is a minimal C runtime environment, and so doesn't support the complete POSIX spec. If you want to use functions like this you will need to use an environment that provides a more comprehensive POSIX implementation. For example both the ucLinux and eCos operating systems contain this function. Both of these are available for download through this forum.
If you want a single-threaded C runtime environment that includes POSIX file I/O then eCos can be configured in this way (i.e. without a scheduler). That may be an option to consider, depending on your memory budget.
With the Altera HAL, you will need to set a file descriptor into non-blocking mode at open time.