title: clang-analyzer: scan-build ./configure fails looking for pthread support: "_REENTRANT must be defined"
body: <p>I'm using pthreads and my scan-build action has failed:</p>
  <p><a href="https://github.com/SentryPeer/SentryPeer/runs/5034401493?check_suite_focus=true" rel="nofollow noreferrer">https://github.com/SentryPeer/SentryPeer/runs/5034401493?check_suite_focus=true</a></p>
  <p>I see this:</p>
  <pre><code>cat clang_output_*
  conftest.c:59:26: error: &quot;_REENTRANT must be defined&quot;
  #                        error &quot;_REENTRANT must be defined&quot;
                           ^
  </code></pre>
  <p>and</p>
  <pre><code>checking whether /usr/bin/../libexec/ccc-analyzer is Clang... rm: cannot remove 'conftest.plist': Is a directory
  no
  checking whether pthreads work with &quot;-pthread&quot; and &quot;-lpthread&quot;... no
  checking whether pthreads work with -pthread... no
  checking whether pthreads work with -pthreads... no
  checking for the pthreads library -lpthreads... no
  checking whether pthreads work without any flags... no
  checking whether pthreads work with -Kthread... no
  checking whether pthreads work with -pthread... no
  checking whether pthreads work with -pthreads... no
  checking whether pthreads work with -mthreads... no
  checking for the pthreads library -lpthread... no
  checking whether pthreads work with --thread-safe... no
  checking whether pthreads work with -mt... no
  checking for pthread-config... no
  configure: error: POSIX threads support is required
  scan-build: Analysis run complete.
  scan-build: Removing directory '/tmp/scan-build-2022-02-02-202911-1481984-1' because it contains no reports.
  scan-build: No bugs found.
  </code></pre>
  <p>Version:
  clang-analyzer-13.0.0-3.fc35.noarch</p>
  <p>My autotools builds fine without scan-build on the same Ubuntu version, as per:</p>
  <p><a href="https://github.com/SentryPeer/SentryPeer/actions/runs/1783127976" rel="nofollow noreferrer">https://github.com/SentryPeer/SentryPeer/actions/runs/1783127976</a></p>
  <p>Any tips here? Not sure if this is a bug nor where to ask. I've raised it here too - <a href="https://github.com/llvm/llvm-project/issues/53552" rel="nofollow noreferrer">https://github.com/llvm/llvm-project/issues/53552</a></p>
  <p>Thanks for reading,
  Gavin.</p>