Hi. I'd like to help but before we go too far, I need a few things clarified....
(1) you're trying to compile a Nios II Linux application?
(2) Are you using the Microtronix Nios II Application Project type to build your app?
(3) It looks like your app is trying to link against libc provided by Altera. Is this intentional?
A few quick words before I sign off...
All Nios II Linux applications should be linked against the uClibc to ensure the greatest amount of compatibility (instead of say glibc or newlib, etc).
Other specialty libraries can be used as well but when trying to pull in the code for common functions such as open, close, read, write, etc... uClibc is your best bet.
Creating a Nios II Linux application project in the Nios II IDE is a good place to start.