Patch to avoid the following building errors:
Import includes file: out/target/product/x86_64/obj/EXECUTABLES/su_intermediates/import_includes
target C: su <= external/koush/Superuser/Superuser/jni/su/su.c
external/koush/Superuser/Superuser/jni/su/su.c: In function 'socket_send_request':
external/koush/Superuser/Superuser/jni/su/su.c:397:5: error: implicit declaration of function 'htonl' [-Werror=implicit-function-declaration]
write_token(fd, "version", PROTO_VERSION);
^
target C: su <= external/koush/Superuser/Superuser/jni/su/pts.c
Export includes file: external/koush/Superuser/Android.mk -- out/target/product/x86_64/obj/EXECUTABLES/su_intermediates/export_includes
target Prebuilt: clatd.conf (out/target/product/x86_64/obj/ETC/clatd.conf_intermediates/clatd.conf)
external/koush/Superuser/Superuser/jni/su/pts.c: In function 'pts_open':
external/koush/Superuser/Superuser/jni/su/pts.c:121:5: error: implicit declaration of function 'strncpy' [-Werror=implicit-function-declaration]
strncpy(slave_name, sn_tmp, slave_name_size);
^
*/
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <sys/types.h>
+#include <sys/endian.h>
#include "su.h"
#include "utils.h"