Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 1 | diff -r -u -d /home/enh/Downloads/strace-4.7/defs.h ./defs.h |
| 2 | --- /home/enh/Downloads/strace-4.7/defs.h 2012-04-28 05:58:35.000000000 -0700 |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 3 | +++ ./defs.h 2014-01-08 17:19:46.318388528 -0800 |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 4 | @@ -36,9 +36,6 @@ |
| 5 | # define _LFS64_LARGEFILE 1 |
| 6 | # endif |
Elliott Hughes | e10a1e2 | 2013-03-21 18:08:32 -0700 | [diff] [blame] | 7 | #endif |
Elliott Hughes | e10a1e2 | 2013-03-21 18:08:32 -0700 | [diff] [blame] | 8 | -#ifdef MIPS |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 9 | -# include <sgidefs.h> |
Elliott Hughes | e10a1e2 | 2013-03-21 18:08:32 -0700 | [diff] [blame] | 10 | -#endif |
Elliott Hughes | e10a1e2 | 2013-03-21 18:08:32 -0700 | [diff] [blame] | 11 | #include <features.h> |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 12 | #ifdef HAVE_STDBOOL_H |
| 13 | # include <stdbool.h> |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 14 | @@ -149,7 +146,7 @@ |
| 15 | extern long ptrace(int, int, char *, long); |
| 16 | #endif |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 17 | |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 18 | -#if !defined(__GLIBC__) |
| 19 | +#if !defined(__GLIBC__) && !defined(__BIONIC__) |
| 20 | # define PTRACE_PEEKUSER PTRACE_PEEKUSR |
| 21 | # define PTRACE_POKEUSER PTRACE_POKEUSR |
| 22 | #endif |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 23 | diff -r -u -d /home/enh/Downloads/strace-4.7/ioctl.c ./ioctl.c |
| 24 | --- /home/enh/Downloads/strace-4.7/ioctl.c 2012-04-18 08:27:25.000000000 -0700 |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 25 | +++ ./ioctl.c 2014-01-07 20:25:53.752273114 -0800 |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 26 | @@ -86,8 +86,10 @@ |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 27 | case 0x03: |
| 28 | case 0x12: |
| 29 | return block_ioctl(tcp, code, arg); |
| 30 | +#ifndef HAVE_ANDROID_OS |
| 31 | case 0x22: |
| 32 | return scsi_ioctl(tcp, code, arg); |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 33 | +#endif |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 34 | case 'L': |
| 35 | return loop_ioctl(tcp, code, arg); |
| 36 | case 'M': |
| 37 | diff -r -u -d /home/enh/Downloads/strace-4.7/ipc.c ./ipc.c |
| 38 | --- /home/enh/Downloads/strace-4.7/ipc.c 2012-04-16 04:00:01.000000000 -0700 |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 39 | +++ ./ipc.c 2014-01-07 20:25:53.752273114 -0800 |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 40 | @@ -34,9 +34,15 @@ |
| 41 | #endif |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 42 | #include <fcntl.h> |
| 43 | #include <sys/ipc.h> |
| 44 | +#ifdef HAVE_ANDROID_OS |
| 45 | +#include <linux/sem.h> |
| 46 | +#include <linux/msg.h> |
| 47 | +#include <linux/shm.h> |
| 48 | +#else |
| 49 | #include <sys/sem.h> |
| 50 | #include <sys/msg.h> |
| 51 | #include <sys/shm.h> |
| 52 | +#endif |
| 53 | |
| 54 | #ifndef MSG_STAT |
| 55 | #define MSG_STAT 11 |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 56 | diff -r -u -d /home/enh/Downloads/strace-4.7/signal.c ./signal.c |
| 57 | --- /home/enh/Downloads/strace-4.7/signal.c 2012-04-16 19:38:17.000000000 -0700 |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 58 | +++ ./signal.c 2014-01-07 20:25:53.762272989 -0800 |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 59 | @@ -419,7 +419,7 @@ |
| 60 | # define SI_FROMUSER(sip) ((sip)->si_code <= 0) |
| 61 | #endif |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 62 | |
| 63 | -#if __GLIBC_MINOR__ < 1 |
| 64 | +#if __GLIBC_MINOR__ < 1 && !defined(HAVE_ANDROID_OS) |
| 65 | /* Type for data associated with a signal. */ |
| 66 | typedef union sigval |
| 67 | { |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 68 | diff -r -u -d /home/enh/Downloads/strace-4.7/time.c ./time.c |
| 69 | --- /home/enh/Downloads/strace-4.7/time.c 2012-05-01 14:17:51.000000000 -0700 |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 70 | +++ ./time.c 2014-01-07 20:25:53.762272989 -0800 |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 71 | @@ -29,7 +29,11 @@ |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 72 | |
| 73 | #include "defs.h" |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 74 | #include <linux/version.h> |
Elliott Hughes | bb0c2d5 | 2014-01-07 17:34:14 -0800 | [diff] [blame] | 75 | +#if HAVE_ANDROID_OS |
Jeff Brown | f76f96e | 2012-03-02 16:23:23 -0800 | [diff] [blame] | 76 | +#include <linux/timex.h> |
| 77 | +#else |
| 78 | #include <sys/timex.h> |
| 79 | +#endif |
| 80 | #include <linux/ioctl.h> |
| 81 | #include <linux/rtc.h> |
| 82 | |
Elliott Hughes | 10bd42d | 2014-01-08 16:34:09 -0800 | [diff] [blame^] | 83 | diff -r -u -d /home/enh/Downloads/strace-4.7/util.c ./util.c |
| 84 | --- /home/enh/Downloads/strace-4.7/util.c 2012-04-28 05:58:35.000000000 -0700 |
| 85 | +++ ./util.c 2014-01-08 17:20:55.057579140 -0800 |
| 86 | @@ -50,7 +50,9 @@ |
| 87 | |
| 88 | #ifdef HAVE_SYS_REG_H |
| 89 | # include <sys/reg.h> |
| 90 | -# define PTRACE_PEEKUSR PTRACE_PEEKUSER |
| 91 | +# ifndef PTRACE_PEEKUSR |
| 92 | +# define PTRACE_PEEKUSR PTRACE_PEEKUSER |
| 93 | +# endif |
| 94 | #elif defined(HAVE_LINUX_PTRACE_H) |
| 95 | # undef PTRACE_SYSCALL |
| 96 | # ifdef HAVE_STRUCT_IA64_FPREG |