Support asm/sockios.h for MIPS.

Change-Id: I5ae75b0a8c2ff5698ca46f02bb371e710fb1fee0
diff --git a/ndk/sources/android/libportable/arch-mips/ioctl.c b/ndk/sources/android/libportable/arch-mips/ioctl.c
index 0e4fa07..cbd517f 100644
--- a/ndk/sources/android/libportable/arch-mips/ioctl.c
+++ b/ndk/sources/android/libportable/arch-mips/ioctl.c
@@ -18,6 +18,7 @@
 #include <sys/ioctl.h>
 #include <ioctls_portable.h>
 #include <termios.h>
+#include <linux/sockios.h>
 
 #if FIONREAD_PORTABLE==FIONREAD
 #error Bad build environment
@@ -195,6 +196,18 @@
         return TIOCGLTC;
     case OTIOCCONS_PORTABLE:
         return OTIOCCONS;
+    case FIOSETOWN_PORTABLE:
+        return FIOSETOWN;
+    case SIOCSPGRP_PORTABLE:
+        return SIOCSPGRP;
+    case FIOGETOWN_PORTABLE:
+        return FIOGETOWN;
+    case SIOCGPGRP_PORTABLE:
+        return SIOCGPGRP;
+    case SIOCATMARK_PORTABLE:
+        return SIOCATMARK;
+    case SIOCGSTAMP_PORTABLE:
+        return SIOCGSTAMP;
     }
     return request;
 }
diff --git a/ndk/sources/android/libportable/common/include/ioctls_portable.h b/ndk/sources/android/libportable/common/include/ioctls_portable.h
index 43bb375..e9e977c 100644
--- a/ndk/sources/android/libportable/common/include/ioctls_portable.h
+++ b/ndk/sources/android/libportable/common/include/ioctls_portable.h
@@ -171,4 +171,13 @@
 #define TIOCGLTC_PORTABLE    _IOR_PORTABLE('t',116,struct ltchars_portable)/* get local special chars*/
 #define OTIOCCONS_PORTABLE   _IO_PORTABLE('t', 98)    /* for hp300 -- sans int arg */
 
+/* Derived from development/ndk/platforms/android-3/arch-arm/include/asm/sockios.h */
+
+#define FIOSETOWN_PORTABLE 0x8901
+#define SIOCSPGRP_PORTABLE 0x8902
+#define FIOGETOWN_PORTABLE 0x8903
+#define SIOCGPGRP_PORTABLE 0x8904
+#define SIOCATMARK_PORTABLE 0x8905
+#define SIOCGSTAMP_PORTABLE 0x8906
+
 #endif /* _IOCTLS_PORTABLE_H */
diff --git a/ndk/sources/android/libportable/common/include/socket_portable.h b/ndk/sources/android/libportable/common/include/socket_portable.h
index 57be0a9..ff1f9c4 100644
--- a/ndk/sources/android/libportable/common/include/socket_portable.h
+++ b/ndk/sources/android/libportable/common/include/socket_portable.h
@@ -17,7 +17,7 @@
 #ifndef _SOCKET_PORTABLE_H_
 #define _SOCKET_PORTABLE_H_
 
-/* From ndk/platforms/android-3/include/sys/socket.h */
+/* Derived from development/ndk/platforms/android-3/include/sys/socket.h */
 #define SOCK_STREAM_PORTABLE    1
 #define SOCK_DGRAM_PORTABLE     2
 #define SOCK_RAW_PORTABLE       3
@@ -26,7 +26,7 @@
 #define SOCK_PACKET_PORTABLE    10
 
 
-/* Derived from android-3/arch-arm/include/asm/socket.h */
+/* Derived from development/ndk/platforms/android-3/arch-arm/include/asm/socket.h */
 
 #define SOL_SOCKET_PORTABLE     1