diff --git a/public/ioctl_defines b/public/ioctl_defines
index cbf4903228fd08f0873f296a43ad64080a497654..a46302333d3ae55f7efcea9b040e6fd2e6592c0d 100644
--- a/public/ioctl_defines
+++ b/public/ioctl_defines
@@ -791,7 +791,7 @@ define(`FIOASYNC', `0x00005452')
 define(`FIOCLEX', ifelse(target_arch, mips, 0x00006601, 0x00005451))
 define(`FIOGETOWN', `0x00008903')
 define(`FIONBIO', `0x00005421')
-define(`FIONCLEX', `0x00005450')
+define(`FIONCLEX', ifelse(target_arch, mips, 0x00006602, 0x00005450))
 define(`FIONREAD', ifelse(target_arch, mips, 0x0000467f, 0x0000541b))
 define(`FIOQSIZE', `0x00005460')
 define(`FIOSETOWN', `0x00008901')