[asterisk-bugs] [JIRA] (ASTERISK-27711) [patch] BuildSystem: Avoid re-defining of pthread_* on NetBSD.
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Sun Mar 4 08:57:13 CST 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Mudgett updated ASTERISK-27711:
---------------------------------------
Assignee: Alexander Traud
> [patch] BuildSystem: Avoid re-defining of pthread_* on NetBSD.
> --------------------------------------------------------------
>
> Key: ASTERISK-27711
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27711
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/BuildSystem
> Affects Versions: 13.19.2
> Environment: NetBSD 7.1.1
> Reporter: Alexander Traud
> Assignee: Alexander Traud
> Severity: Trivial
> Labels: patch
> Attachments: NetBSD_pthread_defines.patch
>
>
> {code}include/asterisk/lock.h:629:0: warning: "pthread_cond_timedwait" redefined
> /usr/include/pthread.h:332:0: note: this is the location of the previous definition
> #define pthread_cond_timedwait __libc_cond_timedwait{code}Whenever the header file {{lock.h}} is included (directly or indirectly), the compiler gcc (tested 7.3.0, 6.4.0, and 4.8.5) emits warnings like the one above. Therefore, several hundred warnings like this are printed on the console, while making Asterisk.
> In NetBSD (tested 7.1.1), two alternative approaches exist:
> A) Add a define for \_\_LIBPTHREAD_SOURCE\_\_ to _ASTCFLAGS in Makefile, or
> B) #undef all pthread_* in {{include/asterisk/lock.h}}.
> Because those symbols might not be defined but functions on other platforms, I opted for alternative A. However, if more platforms are affected by this, alternative B is feasible via ifdef-then-undef.
> The same issue was already found/posted four years ago in June 2013 by John Nemeth, member of the NetBSD team.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list