[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Error while using pthreads



Hi
I am trying to compile pthread application , but getting the following error . I think this is a bug in GCC libraries.

gcc -lpthread -c *.c
srtp_impl.c: In function ‘srtp_init_connection’:
srtp_impl.c:8: error: expected expression before ‘{’ token
srtp_impl.c:9: error: expected expression before ‘{’ token
make: *** [all] Error 1

My function looks correct with

connEntities[connid]->rcvWinFillMutex = PTHREAD_MUTEX_INITIALIZER;

where
connEntities[connid]->rcvWinFillMutex is pthread_mutex_t

The GCC version and other details are as follows

hvijaykumar@bhvijay:~/programming/IPProject/SRTP$ gcc --v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Please let me know if i can help with any more details to resolve this . If it is already fixed please let me know

Thanks
Vijay




Reply to: