<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJytVktv4zYQ_jXyhZBAvSz7oIO7SdqgaLrIBoveDJocSWwkUuVjU_fXdyg7thPYwWazhjAmqZnhN29ttNjWv0nC-j7KPkX0KqKrHb2Nsmog3krVktF1BpiwhClBhi2xnKl442UvCONOakU6ZknDZA8iylenajrnRhvOsht8Wuk6v0m4HnDzBZQz288A5vXGeGXxr6R5UdC0WOZRfsM74I9r66WDdaO5R6VXznh4gZlYAOI6aV-hiOZ0_0xbzhzhPVPtWns3ereOsj0j16pxYF3CUUO5RJLNkRAwRpuwiLJsfX99ffdwv7p7IIO3jmyACGikQtuzbH9flpMLv0nTd6q5pINE5fVZw3Y0ROkt64MnQ1ifOnAdBDA33ga_b6RCmiRIermBf4HjinMeM8X67X_IKi35FByXJAkxQ3AIpoLSjhgY9DdAVdXBhWMvrcODwHWLuUOENMCdNtsdDqUv4Dmk25M2j-QJcyb4K94f43LKw3DUH88CovdofFb3o3L2rGCDsUXJoyD60TCzJQeo5-UuX4gZiuZuSdOz9r2yJP79Y0b-XOe8JTh8zKvvvi_encWWNfADYC_C3LPHoQpk-4JtOvEGXvSTz39-uf2LPN9h_Thq40KZGfjHY72InfCx4wahVShHG5i8IthMxx4cJOc470NZBmyH2gslilXthhHpkTnOKNYTnR5cLtM0TotFulwUcYoS2J048xaIxM6plWNSWbQMUQa89uzdd5psfItzQXslkjf61VcwFofIoWdPrfnQc-I0T2hC4zxpeF4mSjPDu1PxP7aEeaed1r0l0-14J_bRQ_mcjitLRjA_Y0btBp89Tqu0WuRpVi2r-anuFZauk6MlmEsY-Rv0CgLCLCCymSZViDULjkJ3mpB1-MppBPqYnOp56Jh6tFOKhVTBkB7m9a8MI_yCeSbqXCzzJZuhYzpt6rYDZbYzb_r6DWP7_tvzXzwa_TcmDG6ltR6mcZyXZTbraiEE32SVWACFihai4KJaMlpRQbMmLeisZxvobR2Vv2BfVvBEJhVhqpVXs48jkHXIVTqRvKBlUhZVNWeZmM-bbCFSGhUUBvwYSYKeRJt2ZupJZUhHfBnmkj2-ZNbKVgFMgBGhk66H-iRpwjw8VO_0mYMdSOvXNf9cvd_zmTCbbKong_4HhNsIWw>53552</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            scan-build ./configure fails looking for pthread support: "_REENTRANT must be defined"
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ghenry
      </td>
    </tr>
</table>

<pre>
    Hi all,

I'm using pthreads and my scan-build action has failed:

https://github.com/SentryPeer/SentryPeer/runs/5034401493?check_suite_focus=true

I see this:

```
cat clang_output_*
conftest.c:59:26: error: "_REENTRANT must be defined"
#                        error "_REENTRANT must be defined"
                         ^
```

and 

```
checking whether /usr/bin/../libexec/ccc-analyzer is Clang... rm: cannot remove 'conftest.plist': Is a directory
no
checking whether pthreads work with "-pthread" and "-lpthread"... 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.
```

Version:
clang-analyzer-13.0.0-3.fc35.noarch

My autotools builds fine without scan-build as per:

https://github.com/SentryPeer/SentryPeer/actions/runs/1783127976

Any tips here? Not sure if this is a bug nor where to ask.

Thanks for reading,
Gavin.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytVdtu2zgQ_Rr5hZCgq2U_6MHb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