mirror of https://github.com/adamdruppe/arsd.git
Merge pull request #395 from Inkrementator/cgi_portability_android
Use the alias socklen_t for portability
This commit is contained in:
commit
350a352a39
6
cgi.d
6
cgi.d
|
|
@ -8839,11 +8839,7 @@ void runAddonServer(EIS)(string localListenerName, EIS eis) if(is(EIS : EventIoS
|
||||||
void newConnection() {
|
void newConnection() {
|
||||||
// on edge triggering, it is important that we get it all
|
// on edge triggering, it is important that we get it all
|
||||||
while(true) {
|
while(true) {
|
||||||
version(Android) {
|
auto size = cast(socklen_t) addr.sizeof;
|
||||||
auto size = cast(int) addr.sizeof;
|
|
||||||
} else {
|
|
||||||
auto size = cast(uint) addr.sizeof;
|
|
||||||
}
|
|
||||||
auto ns = accept(sock, cast(sockaddr*) &addr, &size);
|
auto ns = accept(sock, cast(sockaddr*) &addr, &size);
|
||||||
if(ns == -1) {
|
if(ns == -1) {
|
||||||
if(errno == EAGAIN || errno == EWOULDBLOCK) {
|
if(errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue