Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libkqueue 2.5.0 no longer builds with MinGW-w64 #111

Closed
brechtsanders opened this issue Sep 8, 2021 · 1 comment
Closed

libkqueue 2.5.0 no longer builds with MinGW-w64 #111

brechtsanders opened this issue Sep 8, 2021 · 1 comment

Comments

@brechtsanders
Copy link

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:

  • LIST_HEAD is not defined on this platform but it is used in src/common/private.h to define kf_ready
  • This platform has pthread.h, but src/windows/platform.h redefines it anyway, but it's not working:
    • pthread_mutexattr_t is used in src/common/private.h but it's not defined anywhere
    • src/windows/platform.h defines pthread_mutex_init with 2 parameters, but src/common/kqueue.c calls it with only 1
@arr2036
Copy link
Collaborator

arr2036 commented Sep 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants