Fix android build, related to issue fix

This commit is contained in:
Jeremy Lakeman 2014-04-07 15:24:23 +09:30
parent 1f49ee47ae
commit 025726dcab
2 changed files with 2 additions and 12 deletions

View File

@ -28,6 +28,7 @@ SERVALD_LOCAL_CFLAGS = \
-DHAVE_JNI_H=1 -DHAVE_STRUCT_UCRED=1 -DHAVE_CRYPTO_SIGN_NACL_GE25519_H=1 \
-DBYTE_ORDER=_BYTE_ORDER -DHAVE_LINUX_STRUCT_UCRED -DUSE_ABSTRACT_NAMESPACE \
-DHAVE_BCOPY -DHAVE_BZERO -DHAVE_NETINET_IN_H -DHAVE_LSEEK64 -DSIZEOF_OFF_T=4 \
-DHAVE_LINUX_IF_H \
-I$(NACL_INC) \
-I$(SQLITE3_INC)

View File

@ -155,22 +155,11 @@ void monitor_poll(struct sched_ent *alarm)
/* Check for new connections */
/* We don't care about the peer's address */
ignored_length = 0;
while (
#ifdef HAVE_LINUX_IF_H
(s = accept4(alarm->poll.fd, NULL, &ignored_length,O_NONBLOCK))
#else
(s = accept(alarm->poll.fd,NULL, &ignored_length))
#endif
!= -1
) {
while ((s = accept(alarm->poll.fd,NULL, &ignored_length))!= -1) {
monitor_new_client(s);
}
if (errno != EAGAIN) {
#ifdef HAVE_LINUX_IF_H
WHY_perror("accept4(O_NONBLOCK)");
#else
WHY_perror("accept");
#endif
}
}