shithub: mc

Download patch

ref: e4a2b887047fc3aa9e8f53a434f15bf9ea8b4076
parent: 20bb3cd7fba8281b0ce5ff3ca2641b00e2e8cc67
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Apr 29 17:56:25 EDT 2016

Add support for poll on FreeBSD.

--- a/lib/sys/sys+freebsd-x64.myr
+++ b/lib/sys/sys+freebsd-x64.myr
@@ -47,6 +47,13 @@
 	const Pollwrband	: uint16 = 0x0100	/* OOB/Urgent data can be written */
 	/* General FreeBSD extension (currently only supported for sockets): */
 	const Pollinigneof	: uint16 = 0x2000	/* like POLLIN, except ignore EOF */
+	/*
+	* These events are set if they occur regardless of whether they were
+	* requested.
+	*/
+	const Pollerr		: uint16 = 0x0008		/* some poll error occurred */
+	const Pollhup		: uint16 = 0x0010		/* file descriptor was "hung up" */
+	const Pollnval		: uint16 = 0x0020		/* requested events "invalid" */
 
 	type waitstatus = union
 		`Waitfail int32