Not finding __USE_UNIX98 definitions or pthread_mutexattr_settype()

Philip A. Prindeville philipp_subx at redfish-solutions.com
Thu Jan 14 17:04:27 UTC 2010


No one has an idea?


On 01/10/2010 02:50 PM, Philip A. Prindeville wrote:
> Hi.
>
> We're using uClibc 0.9.28 (patched) for the Astlinux project (and yes, we intend to update... after we get this release out).
>
> We're trying to compile spandsp and app_rxfax (an app for Asterisk that's part of spandsp) and getting:
>
> In file included from app_rxfax.c:29:
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h: In function 'ast_mutex_init':
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1698: warning: implicit declaration of function 'pthread_mutexattr_settype'
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h: At top level:
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1760: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ast_rwlock_t'
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1770: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1786: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1791: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1796: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1801: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1822: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1827: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1832: error: expected ')' before '*' token
> /home/philipp/kernel/build_i586/asterisk-1.6.2.0/include/asterisk/lock.h:1855: error: expected ')' before '*' token
> ...
>
> etc.
>
>
> >From what I can tell, pthread_mutexattr_settype() isn't being declared because __USE_UNIX98 isn't set when <pthread.h> gets included, and __USE_UNIX96 gets set in <features.h> by having _LIBC set.  So why isn't _LIBC getting set?
>
> Is there a header file I forgot to include?
>
> My understanding was that most system header files are self-including (i.e. pthread.h pulls in features.h and whatever else might be needed for me... I don't need to do that).
>
> So my next thought is that either I'm missing some patch, or I'm not passing in some compile-time flag like -D_GNU_SOURCE=1...
>
> Which one is it?
>
> Thanks,
>
> -Philip
>   



More information about the uClibc mailing list