--- a/libffi/src/mips/ffitarget.h	2014-11-08 13:47:24.000000000 +0100
+++ b/libffi/src/mips/ffitarget.h	2017-11-09 16:51:11.866848444 +0100
@@ -42,7 +42,7 @@
 #define _MIPS_SIM_NABI32	2
 #define _MIPS_SIM_ABI64		3
 #elif !defined(__OpenBSD__) && !defined(__FreeBSD__)
-# include <sgidefs.h>
+# include <asm/sgidefs.h>
 #endif
 
 #  ifndef _ABIN32
