util.c:254: error: expected declaration specifiers or â...â before âcurlsocktypeâ
util.c: In function âjson_rpc_callâ:
util.c:347: error: âCURLOPT_SOCKOPTFUNCTIONâ undeclared (first use in this function)
util.c:347: error: (Each undeclared identifier is reported only once
util.c:347: error: for each function it appears in.)
make[2]: *** [cgminer-util.o] Error 1
make[2]: Leaving directory `/root/building/cgminer-1.4.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/building/cgminer-1.4.1'
make: *** [all] Error 2
What is the fix???
checking for the version of libcurl... 7.15.5
checking for libcurl >= version 7.10.1... yes
checking whether libcurl is usable... yes
checking for curl_free... yes
...
gcc -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I./lib -I./lib -DHAS_YASM -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O3 -Wall -MT cgminer-util.o -MD -MP -MF .deps/cgminer-util.Tpo -c -o cgminer-util.o `test -f 'util.c' || echo './'`util.c
util.c:254: error: expected declaration specifiers or '...' before 'curlsocktype'
util.c: In function 'json_rpc_call':
util.c:348: error: 'CURLOPT_SOCKOPTFUNCTION' undeclared (first use in this function)
util.c:348: error: (Each undeclared identifier is reported only once
util.c:348: error: for each function it appears in.)
make[2]: Leaving directory `/builddir/build/BUILD/cgminer-1.4.0'
make[2]: *** [cgminer-util.o] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/cgminer-1.4.0'
RPM build errors:
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.75423 (%build)
Bad exit status from /var/tmp/rpm-tmp.75423 (%build)
Child returncode was: 1
Could be old gcc or curl... is it possible to put a conditional to fix this? Previous versions did build just fine... The full log is here: http://rpm.zaytsev.net/test/cgminer/build.log
P.S. The fix by ycros doesn't help, I tried to replace util.c.
P.P.S. Yes, that's the curl version that is too old. Is it possible to make longpoll optional via configure??? It doesn't have all this CURLOPT_SOCKOPTFUNCTION stuff. It would suck if the support for RHEL5 would have to be dropped completely.