ruby-changes:66063
From: Nobuyoshi <ko1@a...>
Date: Thu, 6 May 2021 09:42:41 +0900 (JST)
Subject: [ruby-changes:66063] 921d8ac99d (master): Get rid of including sys/user.h on macOS
https://git.ruby-lang.org/ruby.git/commit/?id=921d8ac99d From 921d8ac99d264fec26e15b75ea4fbe024aef281b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 6 May 2021 09:39:47 +0900 Subject: 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 ^ ``` --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e49c128..dd553b2 100644 --- a/configure.ac +++ b/configure.ac @@ -2727,7 +2727,10 @@ main(int argc, char *argv[]) https://github.com/ruby/ruby/blob/trunk/configure.ac#L2727 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([[ -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/