[Home]

Summary:ASTERISK-27711: [patch] BuildSystem: Avoid re-defining of pthread_* on NetBSD.
Reporter:Alexander Traud (traud)Labels:patch
Date Opened:2018-03-03 03:31:40.000-0600Date Closed:2018-03-05 11:30:08.000-0600
Priority:TrivialRegression?
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:13.19.2 Frequency of
Occurrence
Related
Issues:
Environment:NetBSD 7.1.1Attachments:( 0) NetBSD_pthread_defines.patch
Description:{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.
Comments:By: Asterisk Team (asteriskteam) 2018-03-03 03:31:41.228-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Friendly Automation (friendly-automation) 2018-03-05 11:30:09.348-0600

Change 8407 merged by Jenkins2:
BuildSystem: Avoid re-defining of pthread_* on NetBSD.

[https://gerrit.asterisk.org/8407|https://gerrit.asterisk.org/8407]

By: Friendly Automation (friendly-automation) 2018-03-05 11:31:15.054-0600

Change 8406 merged by Jenkins2:
BuildSystem: Avoid re-defining of pthread_* on NetBSD.

[https://gerrit.asterisk.org/8406|https://gerrit.asterisk.org/8406]

By: Friendly Automation (friendly-automation) 2018-03-05 11:33:52.657-0600

Change 8408 merged by Jenkins2:
BuildSystem: Avoid re-defining of pthread_* on NetBSD.

[https://gerrit.asterisk.org/8408|https://gerrit.asterisk.org/8408]