Summary: | ASTERISK-13983: [patch] Detect pthread_rwlock_timedwrlock() before usage | ||
Reporter: | Tilghman Lesher (tilghman) | Labels: | |
Date Opened: | 2009-04-18 09:11:53 | Date Closed: | 2009-04-22 18:04:47 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20090418__detect_timedwrlock.diff.txt ( 1) 20090420__bug14930.diff.txt | |
Description: | On Saturday 18 April 2009 05:48:40 Michiel van Baak wrote: > Tilghman recently committed a fix for bug 14705. > This patch uses pthread_rwlock_timed[(wr)|(rd)]lock > > Those functions are not available on OpenBSD. > Now we have no version of asterisk that compiles anymore. > > Any idea how to fix this other then reverting this one revision (which > makes asterisk compile fine again on OpenBSD) Possibly. We could do a detection for this function in autoconf and implement a poor man's busy-loop using pthread_rwlock_trywrlock, assuming you have that function. | ||
Comments: | By: Michiel van Baak (mvanbaak) 2009-04-18 19:51:10 the AC_COMPILE_IFELSE should be a AC_LINK_IFELSE gcc in compile only mode will simply ignore undefined functions. You have to actually link it to find the missincg function. once I have done that I get: [CC] hashtest2.c -> hashtest2.o In file included from hashtest2.c:39: /home/michiel/src/asterisk/skinny-subs/include/asterisk/lock.h: In function `ast_rwlock_timedwrlock': /home/michiel/src/asterisk/skinny-subs/include/asterisk/lock.h:1844: error: request for member `tv_sec' in something not a structure or union /home/michiel/src/asterisk/skinny-subs/include/asterisk/lock.h:1844: error: request for member `tv_sec' in something not a structure or union /home/michiel/src/asterisk/skinny-subs/include/asterisk/lock.h:1844: error: request for member `tv_nsec' in something not a structure or union gmake[1]: *** [hashtest2.o] Error 1 gmake: *** [utils] Error 2 $ By: Tilghman Lesher (tilghman) 2009-04-20 12:51:24 Patch updated. By: Digium Subversion (svnbot) 2009-04-22 16:35:06 Repository: asterisk Revision: 190092 U branches/1.4/configure U branches/1.4/configure.ac U branches/1.4/include/asterisk/autoconfig.h.in U branches/1.4/include/asterisk/lock.h ------------------------------------------------------------------------ r190092 | tilghman | 2009-04-22 16:35:04 -0500 (Wed, 22 Apr 2009) | 7 lines Detect availability of pthread_rwlock_timedwrlock() before using it. (closes issue ASTERISK-13983) Reported by: tilghman Patches: 20090420__bug14930.diff.txt uploaded by tilghman (license 14) Tested by: mvanbaak, tilghman ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=190092 By: Digium Subversion (svnbot) 2009-04-22 16:38:16 Repository: asterisk Revision: 190093 U trunk/configure U trunk/configure.ac U trunk/include/asterisk/autoconfig.h.in U trunk/include/asterisk/lock.h ------------------------------------------------------------------------ r190093 | tilghman | 2009-04-22 16:38:16 -0500 (Wed, 22 Apr 2009) | 14 lines Merged revisions 190092 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines Detect availability of pthread_rwlock_timedwrlock() before using it. (closes issue ASTERISK-13983) Reported by: tilghman Patches: 20090420__bug14930.diff.txt uploaded by tilghman (license 14) Tested by: mvanbaak, tilghman ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=190093 By: Digium Subversion (svnbot) 2009-04-22 16:41:25 Repository: asterisk Revision: 190094 _U branches/1.6.0/ U branches/1.6.0/configure U branches/1.6.0/configure.ac U branches/1.6.0/include/asterisk/autoconfig.h.in U branches/1.6.0/include/asterisk/lock.h ------------------------------------------------------------------------ r190094 | tilghman | 2009-04-22 16:41:24 -0500 (Wed, 22 Apr 2009) | 21 lines Merged revisions 190093 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r190093 | tilghman | 2009-04-22 16:38:15 -0500 (Wed, 22 Apr 2009) | 14 lines Merged revisions 190092 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines Detect availability of pthread_rwlock_timedwrlock() before using it. (closes issue ASTERISK-13983) Reported by: tilghman Patches: 20090420__bug14930.diff.txt uploaded by tilghman (license 14) Tested by: mvanbaak, tilghman ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=190094 By: Digium Subversion (svnbot) 2009-04-22 16:42:59 Repository: asterisk Revision: 190095 _U branches/1.6.1/ U branches/1.6.1/configure U branches/1.6.1/configure.ac U branches/1.6.1/include/asterisk/autoconfig.h.in U branches/1.6.1/include/asterisk/lock.h ------------------------------------------------------------------------ r190095 | tilghman | 2009-04-22 16:42:59 -0500 (Wed, 22 Apr 2009) | 21 lines Merged revisions 190093 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r190093 | tilghman | 2009-04-22 16:38:15 -0500 (Wed, 22 Apr 2009) | 14 lines Merged revisions 190092 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines Detect availability of pthread_rwlock_timedwrlock() before using it. (closes issue ASTERISK-13983) Reported by: tilghman Patches: 20090420__bug14930.diff.txt uploaded by tilghman (license 14) Tested by: mvanbaak, tilghman ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=190095 By: Digium Subversion (svnbot) 2009-04-22 16:43:26 Repository: asterisk Revision: 190096 _U branches/1.6.2/ U branches/1.6.2/configure U branches/1.6.2/configure.ac U branches/1.6.2/include/asterisk/autoconfig.h.in U branches/1.6.2/include/asterisk/lock.h ------------------------------------------------------------------------ r190096 | tilghman | 2009-04-22 16:43:26 -0500 (Wed, 22 Apr 2009) | 21 lines Merged revisions 190093 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r190093 | tilghman | 2009-04-22 16:38:15 -0500 (Wed, 22 Apr 2009) | 14 lines Merged revisions 190092 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r190092 | tilghman | 2009-04-22 16:35:03 -0500 (Wed, 22 Apr 2009) | 7 lines Detect availability of pthread_rwlock_timedwrlock() before using it. (closes issue ASTERISK-13983) Reported by: tilghman Patches: 20090420__bug14930.diff.txt uploaded by tilghman (license 14) Tested by: mvanbaak, tilghman ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=190096 |