open-hpi / openhpi

Other
6 stars 10 forks source link

Use PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP if libc defines it #1969

Closed mohandev2 closed 6 years ago

mohandev2 commented 6 years ago

Currently we check for OS before using PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP but it would be better to check for it being defined rather.

This helps in fixing build with musl on linux where PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not available but its running on Linux. Current assumption is that its universally available on Linux based OSes

0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch.txt 1969.patch.txt

Reported by: khemraj

Original Ticket: openhpi/bugs/1969

mohandev2 commented 6 years ago

Diff:


--- old
+++ new
@@ -1 +1,2 @@
 0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch (1.6 kB; text/x-patch)
+1969.patch (1.2 kB; application/octet-stream)

Original comment by: HemanthBeecherla

mohandev2 commented 6 years ago

Fixed in revision 7732. Attached commited patch to the bug.

Original comment by: HemanthBeecherla

mohandev2 commented 6 years ago

Original comment by: mohandev2

mohandev2 commented 6 years ago

Original comment by: HemanthBeecherla