mheily / libkqueue

kqueue(2) compatibility library
Other
236 stars 77 forks source link

libkqueue 2.5.0 no longer builds with MinGW-w64 #111

Closed brechtsanders closed 3 years ago

brechtsanders commented 3 years ago

I was able to build libkqueue 2.4.0 for Windows with MinGW-w64, but when building libkqueue 2.5.0 there are multiple problems:

arr2036 commented 3 years ago

It looks like the cleanups have exposed a few pre-existing issues.

Someone renamed LIST_HEAD to FIXME_LIST_HEAD in queue.h to avoid a conflict with Linux macros. That's no longer needed because we no longer include queue.h for Linux, only on platforms which actually need it.

That call to pthread_mutex_init with a single parameter has been there since at least April 2019 with a single parameter... The compatibility macro definitely takes two arguments... I'm confused as to how this used to work.

pthread_mutexattr_t isn't needed for Windows because all locks are recursive by default. I've ifdefd it out, along with the initialisation calls.