The <asm/unistd.h> header was used back when Nios II Linux used a syscall cmpxchg, long since removed and actually never got into the FSF trunk.
Patch removes the #include, and the following error code #defines which are all no longer used. Committed. Chung-Lin 2015-07-22 Chung-Lin Tang <clt...@codesourcery.com> * config/nios2/linux-atomic.c (<asm/unistd.h>): Remove #include. (EFAULT,EBUSY,ENOSYS): Delete unused #defines.
Index: config/nios2/linux-atomic.c =================================================================== --- config/nios2/linux-atomic.c (revision 226061) +++ config/nios2/linux-atomic.c (working copy) @@ -20,11 +20,6 @@ a copy of the GCC Runtime Library Exception along see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ -#include <asm/unistd.h> -#define EFAULT 14 -#define EBUSY 16 -#define ENOSYS 38 - /* We implement byte, short and int versions of each atomic operation using the kernel helper defined below. There is no support for 64-bit operations yet. */