Opened 9 years ago
Closed 9 years ago
#1912 closed defect (fixed)
Build error on Alpine linux (musl libc)
Reported by: | riza | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.5 |
Component: | pjlib | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description
When building on Alpine linux, this error was raised:
../src/pj/os_core_unix.c: In function 'init_mutex': ../src/pj/os_core_unix.c:1107:40: error: 'PTHREAD_MUTEX_FAST_NP' undeclared (first use in this function) rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP); ^
It seems that PTHREAD_MUTEX_FAST_NP and PTHREAD_MUTEX_RECURSIVE_NP is not portable, as the NP suffix indicates a non-portable extension to the POSIX standard.
Reference:
- http://www.unix.com/man-page/POSIX/3posix/pthread_mutexattr_settype/
- http://www.agr.unideb.hu/~agocs/informatics/11_e_unix/unixhelp/unixhelp.ed.ac.uk/CGI/man-cgid5de.html?pthread_mutexattr_settype
Next error was due to the use of an internal struct field
__sched_priority:
../src/samples/siprtp.c:1136:7: error: 'struct sched_param' has no member named '__sched_priority' tp.__sched_priority = max_prio; ^
variables and fields that starts with "__" are for internal use and
should in general not be used in applications.
Reference:
Change History (1)
comment:1 Changed 9 years ago by riza
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
In 5277: