<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On 12 May 2013 00:42, Adrian Sendroiu <span dir="ltr"><<a href="mailto:molecula2788@gmail.com" target="_blank">molecula2788@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br>
</div>Scuze, ma refeream la http-parser\samples.<br></blockquote><div><br></div><div style>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]:</div>
<div style><br></div><div style><div>sock_util.c(132) : error C2664: 'getpeername' : cannot convert parameter 3 from 'size_t *' to 'int *'</div><div> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast</div>
<div>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : return code '0x2'</div><div>Stop.</div><div><br></div><div style>Codul incriminat este:</div><div style>
<br></div><div style><div><span class="" style="white-space:pre"> </span>if (getpeername(s, (SSA *) &addr, &addrlen) < 0)</div><div><br></div><div style>I-am facut lui addrlen cast la (int *) si a mers, insa sunt curios daca asta va influenta comportamentul functiei. </div>
</div></div><div style><br></div><div style>[1] <a href="http://elf.cs.pub.ro/so/res/teme/tema5-util/win/sock_util.c">http://elf.cs.pub.ro/so/res/teme/tema5-util/win/sock_util.c</a></div><div> </div></div>-- <br>Cu stimă,<br>
Mihai Bărbulescu
</div></div>