diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-05-06 09:39:47 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-05-06 09:39:47 +0900 |
commit | 921d8ac99d264fec26e15b75ea4fbe024aef281b (patch) | |
tree | 6a6a7526d8857ac93615b1bfb182494f4368d3fc | |
parent | b655a3fa5b8d1a30565e19425c28a1cfd8631165 (diff) |
Get rid of including sys/user.h on macOS
LIST_HEAD in ccan/list conflicts with sys/queue.h.
```
./ccan/list/list.h:75:9: warning: 'LIST_HEAD' macro redefined [-Wmacro-redefined]
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/queue.h:465:9: note: previous definition is here
^
```
-rw-r--r-- | configure.ac | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index e49c128a45..dd553b22a4 100644 --- a/configure.ac +++ b/configure.ac @@ -2727,7 +2727,10 @@ main(int argc, char *argv[]) test x$rb_cv_fork_with_pthread = xyes || AC_DEFINE(CANNOT_FORK_WITH_PTHREAD) ]) -AC_CHECK_HEADERS([sys/user.h]) +AS_CASE([$target_os], + [darwin*], [ac_cv_header_sys_user_h=yes], dnl LIST_HEAD conflicts with sys/queue.h + [AC_CHECK_HEADERS([sys/user.h])] +) AS_IF([test "x$ac_cv_func_mmap:$ac_cv_header_sys_user_h" = xyes:yes], [ AC_CACHE_CHECK([PAGE_SIZE is defined], rb_cv_page_size, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |