summary refs log tree commit diff homepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/server.c b/server.c
index 9d0af0e..b2b651b 100644
--- a/server.c
+++ b/server.c
@@ -338,11 +338,8 @@ int main() {
 	int kq = kqueue();
 	if (kq < 0) err(EX_OSERR, "kqueue");
 
-	struct kevent event = {
-		.ident = server,
-		.filter = EVFILT_READ,
-		.flags = EV_ADD,
-	};
+	struct kevent event;
+	EV_SET(&event, server, EVFILT_READ, EV_ADD, 0, 0, 0);
 	int nevents = kevent(kq, &event, 1, NULL, 0, NULL);
 	if (nevents < 0) err(EX_OSERR, "kevent");
 
@@ -361,12 +358,7 @@ int main() {
 
 			struct Client *client = clientAdd(fd);
 
-			struct kevent event = {
-				.ident = fd,
-				.filter = EVFILT_READ,
-				.flags = EV_ADD,
-				.udata = client,
-			};
+			EV_SET(&event, fd, EVFILT_READ, EV_ADD, 0, 0, client);
 			nevents = kevent(kq, &event, 1, NULL, 0, NULL);
 			if (nevents < 0) err(EX_IOERR, "kevent");
 
@@ -375,7 +367,7 @@ int main() {
 			continue;
 		}
 
-		struct Client *client = event.udata;
+		struct Client *client = (struct Client *)event.udata;
 		if (event.flags & EV_EOF) {
 			clientRemove(client);
 			continue;
fe9d66d52876be85c6b61b1f36f47ecc819f19&follow=1'>Revert "Enable cookies in title"June McEnroe This reverts commit 3231fe21d3b389448c9a5ca7b4c91fdd25c9e677. 2019-09-20Enable cookies in titleJune McEnroe Perhaps this will make it less suspicious to Google. Who knows. 2019-09-16Use sensitivity aliases in TF2June McEnroe 2019-09-16Add The Just CityJune McEnroe 2019-09-12Only GET the final redirect locationJune McEnroe 2019-09-12Consume entire bodyJune McEnroe Aborting the request and leaving data around may be causing intermittent errors. Just discard the rest of the data. 2019-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe Because apparently it's fine for servers to respond with Content-Encoding you didn't ask for, and curl won't decode it if you didn't ask for it. 2019-09-08Set title User-AgentJune McEnroe Some things don't like you if you don't send one. 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe Allows restarting consumers safely. 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe Oops, didn't see this. 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe