diff --git a/include/fcntl.h b/include/fcntl.h index bfb870df..2a8ece80 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -38,7 +38,14 @@ #define O_EXCL 0x80 #define O_TRUNC 0x200 #define O_APPEND 0x400 + +#ifdef __arm__ +#define O_DIRECTORY 0x4000 +/*#define O_DIRECT 0x10000*/ +#else #define O_DIRECTORY 0x10000 +#endif + #elif __GNU__ #define O_RDONLY 1 #define O_WRONLY 2 diff --git a/include/signal.h b/include/signal.h index 877b2d55..f5129c7b 100644 --- a/include/signal.h +++ b/include/signal.h @@ -126,6 +126,7 @@ typedef long sighandler_t; typedef void (*sighandler_t) (int); #endif +#if __i386__ || __x86_64__ struct sigaction { union @@ -144,7 +145,19 @@ struct sigaction //unsigned long sa_flags; // x86? void (*sa_restorer) (void); }; - +#else /* uapi */ +struct sigaction +{ + union + { + sighandler_t sa_handler; + void (*sa_sigaction) (int signum, siginfo_t *, void *); + }; + unsigned long sa_flags; + void (*sa_restorer) (void); + sigset_t sa_mask; +}; +#endif #define SIG_DFL ((sighandler_t)0) #define SIG_IGN ((sighandler_t)1) diff --git a/include/stdint.h b/include/stdint.h index 8b8994e3..81f88d59 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -85,7 +85,7 @@ typedef unsigned uintmax_t; #define INT_MIN -2147483648 #define INT_MAX 2147483647 -#if __i386__ +#if __i386__ || __arm__ #define LONG_MIN INT_MIN #define LONG_MAX INT_MAX #define UINT_MAX UINT32_MAX diff --git a/include/sys/stat.h b/include/sys/stat.h index 891f31c8..adc75f21 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -35,7 +35,7 @@ typedef int mode_t; #endif // *INDENT-OFF* -#if __i386__ +#if __i386__ || __arm__ struct stat { unsigned long st_dev;