diff --git a/configure.ac b/configure.ac index 26a017ddd..34bbb095a 100644 --- a/configure.ac +++ b/configure.ac @@ -147,6 +147,12 @@ AC_ARG_WITH([swift-toolchain], case $target_os in linux*) os_string="linux" + case $target_cpu in + armv7l*) + target_cpu="armv7" + ;; + *) + esac ;; *) os_string=$target_os diff --git a/dispatch/dispatch.h b/dispatch/dispatch.h index a26b95107..e8d69f893 100644 --- a/dispatch/dispatch.h +++ b/dispatch/dispatch.h @@ -49,9 +49,11 @@ #if defined(__linux__) && defined(__has_feature) #if __has_feature(modules) +#if !defined(__arm__) #include // for off_t (to match Glibc.modulemap) #endif #endif +#endif #define DISPATCH_API_VERSION 20160712 diff --git a/src/io.c b/src/io.c index e4f05aec9..a4aca512d 100644 --- a/src/io.c +++ b/src/io.c @@ -24,6 +24,10 @@ #define DISPATCH_IO_DEBUG DISPATCH_DEBUG #endif +#ifndef PAGE_SIZE +#define PAGE_SIZE getpagesize() +#endif + #if DISPATCH_DATA_IS_BRIDGED_TO_NSDATA #define _dispatch_io_data_retain(x) _dispatch_objc_retain(x) #define _dispatch_io_data_release(x) _dispatch_objc_release(x)