Changeset 92621 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Nov 29, 2021 10:05:23 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148513
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
r85124 r92621 62 62 #include <sys/proc.h> 63 63 #include <sys/kauth.h> 64 #define _OS_OSUNSERIALIZE_H /* HACK ALERT! Block importing OSUnserialized.h as it causes compilation trouble with 65 newer clang versions and the 10.15 SDK, and we really don't need it. Sample error: 66 libkern/c++/OSUnserialize.h:72:2: error: use of OSPtr outside of a return type [-Werror,-Wossharedptr-misuse] */ 64 67 #include <IOKit/IOService.h> 65 68 #include <IOKit/IOUserClient.h> … … 86 89 proc_selfname(a_Name, VBOX_PROC_SELFNAME_LEN) 87 90 /** @} */ 91 92 #ifndef minor 93 /* The inlined C++ function version minor() takes the wrong parameter 94 type, uint32_t instead of dev_t. This kludge works around that. */ 95 # define minor(x) minor((uint32_t)(x)) 96 #endif 88 97 89 98 … … 313 322 { 314 323 /** @todo limit /dev/vboxguest access. */ 315 g_hDevFsDeviceSys = devfs_make_node(makedev( g_iMajorDeviceNo, 0), DEVFS_CHAR,324 g_hDevFsDeviceSys = devfs_make_node(makedev((uint32_t)g_iMajorDeviceNo, 0), DEVFS_CHAR, 316 325 UID_ROOT, GID_WHEEL, 0666, DEVICE_NAME_SYS); 317 326 if (g_hDevFsDeviceSys != NULL) … … 320 329 * And a all-user device. 321 330 */ 322 g_hDevFsDeviceUsr = devfs_make_node(makedev( g_iMajorDeviceNo, 1), DEVFS_CHAR,331 g_hDevFsDeviceUsr = devfs_make_node(makedev((uint32_t)g_iMajorDeviceNo, 1), DEVFS_CHAR, 323 332 UID_ROOT, GID_WHEEL, 0666, DEVICE_NAME_USR); 324 333 if (g_hDevFsDeviceUsr != NULL) … … 499 508 RT_NOREF(Dev, fFlags); 500 509 const bool fUnrestricted = minor(Dev) == 0; 501 const RTPROCESS Process = proc_pid(pProcess);510 const RTPROCESS Process = (RTPROCESS)proc_pid(pProcess); 502 511 const unsigned iHash = SESSION_HASH(Process); 503 512 PVBOXGUESTSESSION pSession; … … 897 906 { 898 907 pvMMIOBase = (void *)m_pMap->getVirtualAddress(); 899 cbMMIO = m_pMap->getLength();908 cbMMIO = (uint32_t)m_pMap->getLength(); 900 909 } 901 910
Note:
See TracChangeset
for help on using the changeset viewer.