Skip to contentSkip to conversation

oxenstored: allow compilation prior to OCaml 3.12.0

PATCH Applied Jonathan Davies 2 participants 2 messages Mar 30, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 oxenstored: allow compilation prior to OCaml 3.12.0

Commit 363ae55c8 used an OCaml feature called record field punning. This broke the build on compilers prior to OCaml 3.12.0.

This patch makes no semantic change but now uses backwards-compatible syntax.

---
Changed since v1:
* names listed in the preamble

---
 tools/ocaml/xenstored/process.ml |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/ocaml/xenstored/process.ml +1 -1
index fb5fdaf..7b60376 100644
@@ -484,7 +484,7 @@ let do_input store cons doms con =
 	if newpacket then (
 		let packet = Connection.pop_in con in
 		let tid, rid, ty, data = Xenbus.Xb.Packet.unpack packet in
-		let req = {Packet.tid; Packet.rid; Packet.ty; Packet.data} in
+		let req = {Packet.tid=tid; Packet.rid=rid; Packet.ty=ty; Packet.data=data} in
 
 		(* As we don't log IO, do not call an unnecessary sanitize_data 
 		   info "[%s] -> [%d] %s \"%s\""
Signature · 7 lines
1.7.10.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw
Quoted 8 lines · Jonathan Davies

Commit 363ae55c8 used an OCaml feature called record field punning. This broke the build on compilers prior to OCaml 3.12.0.

This patch makes no semantic change but now uses backwards-compatible syntax.

Applied.

Quoted 29 lines

---
Changed since v1:
* names listed in the preamble

---
 tools/ocaml/xenstored/process.ml |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/ocaml/xenstored/process.ml +1 -1
index fb5fdaf..7b60376 100644
@@ -484,7 +484,7 @@ let do_input store cons doms con =
 	if newpacket then (
 		let packet = Connection.pop_in con in
 		let tid, rid, ty, data = Xenbus.Xb.Packet.unpack packet in
-		let req = {Packet.tid; Packet.rid; Packet.ty; Packet.data} in
+		let req = {Packet.tid=tid; Packet.rid=rid; Packet.ty=ty; Packet.data=data} in
 
 		(* As we don't log IO, do not call an unnecessary sanitize_data 
 		   info "[%s] -> [%d] %s \"%s\""
Signature · 7 lines
1.7.10.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel