shithub: mc

Download patch

ref: 9c6173cb0b582ce5a5115ea096a0865c7e2334bb
parent: a832e3d49570feddfe89fc31f3c08f73126fa04e
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Apr 25 19:41:36 EDT 2016

Fix build on linux.

--- a/lib/sys/sys+linux-x64.myr
+++ b/lib/sys/sys+linux-x64.myr
@@ -19,6 +19,7 @@
 	type socktype	= int64	/* socket type */
 	type sockproto	= int64	/* socket protocol */
 	type sockfam	= uint16	/* socket family */
+	type sockopt	= int64
 
 	type epollflags	= uint32
 	type epollop	= uint32
@@ -827,6 +828,8 @@
 const bind	= {sock, addr, len;	-> syscall(Sysbind, a(sock), a(addr), a(len)) castto(int)}
 const listen	= {sock, backlog;	-> syscall(Syslisten, a(sock), a(backlog)) castto(int)}
 const accept	= {sock, addr, lenp;	-> syscall(Sysaccept, a(sock), a(addr), a(lenp)) castto(fd)}
+const setsockopt	= {sock, lev, opt, val, len;	-> syscall(Syssetsockopt, a(sock), a(lev), a(opt), a(val), a(len)) castto(int)}
+const getsockopt	= {sock, lev, opt, val, len;	-> syscall(Syssetsockopt, a(sock), a(lev), a(opt), a(val), a(len)) castto(int)}
 
 /* memory mapping */
 const munmap	= {addr, len;		-> syscall(Sysmunmap, a(addr), a(len))}