[all-commits] [llvm/llvm-project] 3b5530: [libc++] Avoid including <semaphore.h> on Apple

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Feb 25 14:53:09 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b5530cf9647cf79ee45aef42c4f5fa7cc9acfd9
      https://github.com/llvm/llvm-project/commit/3b5530cf9647cf79ee45aef42c4f5fa7cc9acfd9
  Author: Louis Dionne <ldionne at apple.com>
  Date:   2020-02-25 (Tue, 25 Feb 2020)

  Changed paths:
    M libcxx/include/__threading_support

  Log Message:
  -----------
  [libc++] Avoid including <semaphore.h> on Apple

It turns out that <semaphore.h> is not well-behaved, as it transitively
includes <sys/param.h>, and that one defines several non-reserved macros
that clash with some downstream projects in modular builds. For the time
being, using <sys/semaphore.h> instead gives us the declarations we need
without the macros.

rdar://59744472




More information about the All-commits mailing list