diff options
author | Romain Tartière <romain@FreeBSD.org> | 2014-12-28 20:09:15 +0000 |
---|---|---|
committer | Romain Tartière <romain@FreeBSD.org> | 2014-12-28 20:09:15 +0000 |
commit | fe50eb282f63645cf71b0510a2d8c5b3694b811a (patch) | |
tree | 6d94915183d102a2b308a55f443c7c86750ed009 /devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs | |
parent | Hook e16-docs (diff) |
Fix AF_UNIX sockets.
Notes
Notes:
svn path=/head/; revision=375752
Diffstat (limited to 'devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs')
-rw-r--r-- | devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs b/devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs new file mode 100644 index 000000000000..6838137c6e5b --- /dev/null +++ b/devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs @@ -0,0 +1,37 @@ + +$FreeBSD$ + +--- src/UnixNativeTransport.cs.orig ++++ src/UnixNativeTransport.cs +@@ -93,10 +93,15 @@ + + byte[] sa = new byte[2 + p.Length + 1]; + ++#if false + //we use BitConverter to stay endian-safe + byte[] afData = BitConverter.GetBytes (UnixSocket.AF_UNIX); + sa[0] = afData[0]; + sa[1] = afData[1]; ++#endif ++ ++ sa[0] = (byte) sa.Length; ++ sa[1] = 1; /* AF_UNIX */ + + for (int i = 0 ; i != p.Length ; i++) + sa[2 + i] = p[i]; +@@ -111,10 +116,15 @@ + + byte[] sa = new byte[2 + 1 + p.Length]; + ++#if false + //we use BitConverter to stay endian-safe + byte[] afData = BitConverter.GetBytes (UnixSocket.AF_UNIX); + sa[0] = afData[0]; + sa[1] = afData[1]; ++#endif ++ ++ sa[0] = (byte) sa.Length; ++ sa[1] = 1; /* AF_UNIX */ + + sa[2] = 0; //null prefix for abstract domain socket addresses, see unix(7) + for (int i = 0 ; i != p.Length ; i++) |