shithub: mc

Download patch

ref: 38fbec291e5dc24213f5111e9523b35701500189
parent: 045848e7ce20786892c6fd395f64e879d57003c0
author: Ori Bernstein <[email protected]>
date: Wed Jun 18 06:57:04 EDT 2014

Add IP protos to OSX

--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -131,6 +131,13 @@
 	const Sockdccp		: socktype = 6	/* data congestion control protocol */
 	const Sockpack		: socktype = 10	/* linux specific packet */
 
+	/* network protocols */
+	const Ipproto_ip	: sockproto = 0
+	const Ipproto_icmp	: sockproto = 1
+	const Ipproto_tcp	: sockproto = 6
+	const Ipproto_udp	: sockproto = 17
+	const Ipproto_raw	: sockproto = 255
+
 	const Seekset	: whence = 0
 	const Seekcur	: whence = 1
 	const Seekend	: whence = 2
@@ -451,12 +458,6 @@
 	const Sysgetcpu			: scno = 309
 	const Sysprocess_vm_readv	: scno = 310
 	const Sysprocess_vm_writev	: scno = 311
-
-	/* network protocols */
-	const Ipproto_ip		: sockproto = 0
-	const Ipproto_icmp		: sockproto = 1
-	const Ipproto_tcp		: sockproto = 6
-	const Ipproto_udp		: sockproto = 17
 
 	/* getting to the os */
 	extern const syscall	: (sc:scno, args:... -> int64)
--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -143,6 +143,12 @@
 	const Sockrdm		: socktype = 4
 	const Sockseqpacket	: socktype = 5
 
+	/* network protocols */
+	const Ipproto_ip	: sockproto = 0
+	const Ipproto_icmp	: sockproto = 1
+	const Ipproto_tcp	: sockproto = 6
+	const Ipproto_udp	: sockproto = 17
+	const Ipproto_raw	: sockproto = 255
 
 	/* return value for a failed mapping */
 	const Mapbad	: byte# = -1 castto(byte#)