PROTON-2346: c/src/proactor/epoll-internal.h: fix build on musl (#300)

* PROTON-2346: c/src/proactor/epoll-internal.h: fix build on musl

Build with epoll proactor on musl is broken since at least version 0.23.0 and
https://github.com/apache/qpid-proton/commit/37136940e3077f25ce58c94775f48c66f666f4a8
because musl does not define PTHREAD_MUTEX_ADAPTIVE_NP resulting in the
following build failure:

In file included from /home/giuliobenetti/autobuild/run/instance-0/output-1/build/qpid-proton-0.33.0/c/src/proactor/epoll.c:60:
/home/giuliobenetti/autobuild/run/instance-0/output-1/build/qpid-proton-0.33.0/c/src/proactor/epoll-internal.h: In function 'pmutex_init':
/home/giuliobenetti/autobuild/run/instance-0/output-1/build/qpid-proton-0.33.0/c/src/proactor/epoll-internal.h:319:36: error: 'PTHREAD_MUTEX_ADAPTIVE_NP' undeclared (first use in this function); did you mean 'PTHREAD_MUTEX_STALLED'?
  319 |   pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    PTHREAD_MUTEX_STALLED

Fixes:
 - http://autobuild.buildroot.org/results/6a901b9ff68b7f52cabf8273d1017025fbd93b0d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

* Update c/src/proactor/epoll-internal.h with explanatory comment

Co-authored-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
1 file changed
tree: 6c02c2f44ee93ca3edeea55cd1345bc0b432e62a
  1. .github/
  2. azure-pipelines/
  3. c/
  4. cpp/
  5. docs/
  6. go/
  7. misc/
  8. python/
  9. ruby/
  10. scripts/
  11. tests/
  12. tools/
  13. .appveyor.yml
  14. .asf.yaml
  15. .gitattributes
  16. .gitignore
  17. .mailmap
  18. .reviewboardrc
  19. .travis.yml
  20. CMakeLists.txt
  21. go.mod
  22. INSTALL.md
  23. LICENSE.txt
  24. NOTICE.txt
  25. README.md
  26. VERSION.txt
README.md

Qpid Proton - AMQP messaging toolkit

Linux/OSX BuildWindows Build
Linux/OSX Build StatusWindows Build Status

Qpid Proton is a high-performance, lightweight messaging library. It can be used in the widest range of messaging applications, including brokers, client libraries, routers, bridges, proxies, and more. Proton makes it trivial to integrate with the AMQP 1.0 ecosystem from any platform, environment, or language.

Features

  • A flexible and capable reactive messaging API
  • Full control of AMQP 1.0 protocol semantics
  • Portable C implementation with bindings to popular languages
  • Peer-to-peer and brokered messaging
  • Secure communication via SSL/TLS and SASL

Universal - Proton is designed to scale both up and down. Equally suitable for simple clients or high-powered servers, it can be deployed in simple peer-to-peer configurations or as part of a global federated messaging network.

Embeddable - Proton is carefully written to be portable and cross platform. It has minimal dependencies, and it is architected to be usable with any threading model, as well as with non-threaded applications. These features make it uniquely suited for embedding messaging capabilities into existing software.

Standard - Built around the AMQP 1.0 messaging standard, Proton is not only ideal for building out your own messaging applications but also for connecting them to the broader ecosystem of AMQP 1.0-based messaging applications.

Please see https://qpid.apache.org/proton for more information.

Getting Started

See the included INSTALL.md file for build and install instructions and the developers.md file for information on how to modify and test the library code itself.