Skip to content

Commit cfd756d

Browse files
mark-mbbgoglin
authored andcommitted
linux: Add basic Android support
Just needs to disable openat() which doesn't seem allowed inside APKs by default.
1 parent b7ad27c commit cfd756d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: config/hwloc.m4

+2-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,8 @@ EOF])
657657
AC_DEFINE([HWLOC_HAVE_CLZL], [1], [Define to 1 if you have the `clzl' function.])
658658
])
659659
660-
AC_CHECK_FUNCS([openat], [hwloc_have_openat=yes])
660+
AS_IF([test "$hwloc_c_vendor" != "android"], [AC_CHECK_FUNCS([openat], [hwloc_have_openat=yes])])
661+
661662
662663
AC_CHECK_HEADERS([malloc.h])
663664
AC_CHECK_FUNCS([getpagesize memalign posix_memalign])

Diff for: config/hwloc_check_vendor.m4

+7-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ AC_DEFUN([_HWLOC_CHECK_COMPILER_VENDOR], [
8787
hwloc_check_compiler_vendor_result="unknown"
8888

8989
# GNU is probably the most common, so check that one as soon as
90-
# possible. Intel pretends to be GNU, so need to check Intel
91-
# before checking for GNU.
90+
# possible. Intel and Android pretend to be GNU, so need to
91+
# check Intel and Android before checking for GNU.
92+
93+
# Android
94+
AS_IF([test "$hwloc_check_compiler_vendor_result" = "unknown"],
95+
[HWLOC_IFDEF_IFELSE([__ANDROID__],
96+
[hwloc_check_compiler_vendor_result="android"])])
9297

9398
# Intel
9499
AS_IF([test "$hwloc_check_compiler_vendor_result" = "unknown"],

0 commit comments

Comments
 (0)