mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
Fix AF_UNIX sockets.
This commit is contained in:
parent
0d3dcd594b
commit
fe50eb282f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=375752
2 changed files with 38 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= dbus-sharp
|
||||
PORTVERSION= 0.7.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= devel gnome
|
||||
MASTER_SITES= http://cloud.github.com/downloads/mono/${PORTNAME}/
|
||||
|
|
37
devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs
Normal file
37
devel/dbus-sharp/files/patch-src_UnixNativeTransport.cs
Normal file
|
@ -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++)
|
Loading…
Add table
Reference in a new issue