[so] [Tema 5][Windows] Compilare http parser
Mihai Barbulescu
b12mihai at gmail.com
Sun May 12 11:21:36 EEST 2013
On 12 May 2013 00:42, Adrian Sendroiu <molecula2788 at gmail.com> wrote:
>
> Scuze, ma refeream la http-parser\samples.
>
Am pus optiunile fix ca acolo (dar nu era mare diferenta fata de ce aveam
inainte, nu inteleg de ce asa a mers, dar a mers, nu mai modific!). Insa am
dat peste o eroare noua cand am incercat sa folosesc sock_util din samples
[1]:
sock_util.c(132) : error C2664: 'getpeername' : cannot convert parameter 3
from 'size_t *' to 'int *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
10.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
Codul incriminat este:
if (getpeername(s, (SSA *) &addr, &addrlen) < 0)
I-am facut lui addrlen cast la (int *) si a mers, insa sunt curios daca
asta va influenta comportamentul functiei.
[1] http://elf.cs.pub.ro/so/res/teme/tema5-util/win/sock_util.c
--
Cu stimă,
Mihai Bărbulescu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20130512/6eafd3d3/attachment-0001.html>
More information about the so
mailing list