Current-Users archive

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

c++ complains about PTHREAD_ONCE_INIT



Hi!

On 5.99.3/amd64, wip/codeblocks complains
c++ -DHAVE_CONFIG_H -I. -I../../src/include 
-I/usr/pkg/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/pkg/include/wx-2.8 
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread 
-I../../src/include/wxscintilla/include -I../../src/include 
-I../../src/include/scripting/include -I../../src/include/scripting/sqplus 
-I../../src/include/wxFlatNotebook/include -I../../src/src/wxAUI 
-DENABLE_BINRELOC -DAPP_PREFIX="\"/usr/pkg\"" -I/usr/pkg/include -I/usr/include 
-I/usr/pkg/include/freetype2 -Ulinux -Uunix  -O2 -ffast-math -O2 
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -DCB_PRECOMP 
-Winvalid-pch -fPIC -DPIC -fexceptions -MT prefix.o -MD -MP -MF 
.deps/prefix.Tpo -c -o prefix.o prefix.cpp
prefix.cpp:237: error: invalid conversion from 'void*' to '__pthread_st*'
prefix.cpp:237: error: invalid conversion from 'void*' to '__pthread_st**'

Line 237 is:
static pthread_once_t br_thread_key_once = PTHREAD_ONCE_INIT;

man pthread_once contains:
pthread_once_t once_control = PTHREAD_ONCE_INIT;

So I think this should work. Why is the c++ compiler complaining?
(missing cast in some internal headers?)
 Thomas


Home | Main Index | Thread Index | Old Index