android build fixes from 220a00bbdf

This commit is contained in:
Adam D. Ruppe 2022-02-15 09:19:09 -05:00
parent 92a6f957f8
commit 28a55a1b3f
1 changed files with 10 additions and 1 deletions

11
cgi.d
View File

@ -2007,11 +2007,13 @@ class Cgi {
uri ~= "s";
uri ~= "://";
uri ~= host;
/+ // the host has the port so p sure this never needed, cgi on apache and embedded http all do the right hting now
version(none)
if(!(!port || port == defaultPort)) {
uri ~= ":";
uri ~= to!string(port);
}
+/
uri ~= requestUri;
return uri;
}
@ -8210,7 +8212,11 @@ void runAddonServer(EIS)(string localListenerName, EIS eis) if(is(EIS : EventIoS
void newConnection() {
// on edge triggering, it is important that we get it all
while(true) {
auto size = cast(uint) addr.sizeof;
version(Android) {
auto size = cast(int) addr.sizeof;
} else {
auto size = cast(uint) addr.sizeof;
}
auto ns = accept(sock, cast(sockaddr*) &addr, &size);
if(ns == -1) {
if(errno == EAGAIN || errno == EWOULDBLOCK) {
@ -8344,6 +8350,7 @@ ssize_t write_fd(int fd, void *ptr, size_t nbytes, int sendfd) {
version(OSX) {
//msg.msg_accrights = cast(cattr_t) &sendfd;
//msg.msg_accrightslen = int.sizeof;
} else version(Android) {
} else {
union ControlUnion {
cmsghdr cm;
@ -8385,6 +8392,7 @@ ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd) {
version(OSX) {
//msg.msg_accrights = cast(cattr_t) recvfd;
//msg.msg_accrightslen = int.sizeof;
} else version(Android) {
} else {
union ControlUnion {
cmsghdr cm;
@ -8411,6 +8419,7 @@ ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd) {
version(OSX) {
//if(msg.msg_accrightslen != int.sizeof)
//*recvfd = -1;
} else version(Android) {
} else {
if ( (cmptr = CMSG_FIRSTHDR(&msg)) != null &&
cmptr.cmsg_len == CMSG_LEN(int.sizeof)) {