Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146570954
D20942.id59713.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
660 B
Referenced Files
None
Subscribers
None
D20942.id59713.diff
View Options
Index: lib/libnv/msgio.c
===================================================================
--- lib/libnv/msgio.c
+++ lib/libnv/msgio.c
@@ -63,7 +63,13 @@
/* Linux: arbitrary size, but must be lower than SCM_MAX_FD. */
#define PKG_MAX_SIZE ((64U - 1) * CMSG_SPACE(sizeof(int)))
#else
-#define PKG_MAX_SIZE ((MCLBYTES - CMSG_SPACE(0)) / sizeof(void *))
+/*
+ * Internalized rights occupy sizeof(void *) bytes of space.
+ * We need to use the same limit on 32-bit and 64-bit platforms
+ * so that 32-bit applications using libnv work properly when
+ * run on 64-bit kernels.
+ */
+#define PKG_MAX_SIZE ((MCLBYTES - CMSG_SPACE(0)) / 8)
#endif
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 4, 6:06 PM (10 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29223565
Default Alt Text
D20942.id59713.diff (660 B)
Attached To
Mode
D20942: Use a platform independent value for PKG_MAX_SIZE.
Attached
Detach File
Event Timeline
Log In to Comment