Commit Diff


commit - 683ec58e0103a83ea39d34559fa855505f68bb74
commit + 5ae43732156d2ae6f9bd67de3dece785bff57524
blob - db5c23f630c6bd7e85a480ad591aeb67d9da8bbc
blob + 17c763b271f67a8fec0c5e7c801f8c3c875d4ae2
--- gotwebd/sockets.c
+++ gotwebd/sockets.c
@@ -622,9 +622,14 @@ sockets_accept_reserve(int sockfd, struct sockaddr *ad
 		errno = EMFILE;
 		return -1;
 	}
+/* TA:  This needs fixing upstream. */
+#ifdef __APPLE__
+	ret = accept(sockfd, addr, addrlen);
+#else
+	ret = accept4(sockfd, addr, addrlen, SOCK_NONBLOCK | SOCK_CLOEXEC);
+#endif
 
-	if ((ret = accept4(sockfd, addr, addrlen,
-	    SOCK_NONBLOCK | SOCK_CLOEXEC)) > -1) {
+	if (ret > -1) {
 		(*counter)++;
 		log_debug("inflight incremented, now %d", *counter);
 	}