|
@@ -1,68 +0,0 @@
|
|
-# HG changeset patch
|
|
|
|
-# User Bill Gianopoulos <wgianopoulos@gmail.com>
|
|
|
|
-# Date 1696258608 0
|
|
|
|
-Fix smslib build bustagei with macOS SDK 14.
|
|
|
|
-
|
|
|
|
-diff --git a/hal/cocoa/smslib.mm b/hal/cocoa/smslib.mm
|
|
|
|
---- a/hal/cocoa/smslib.mm
|
|
|
|
-+++ b/hal/cocoa/smslib.mm
|
|
|
|
-@@ -568,29 +568,22 @@ void smsGetBufferData(char* buffer) {
|
|
|
|
- kern_return_t result;
|
|
|
|
-
|
|
|
|
- if (debugging || running == NO) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- memset(iRecord, 1, iSize);
|
|
|
|
- memset(buffer, 0, oSize);
|
|
|
|
--#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
|
|
|
- const size_t InStructSize = recordSize;
|
|
|
|
- size_t OutStructSize = recordSize;
|
|
|
|
- result = IOConnectCallStructMethod(connection,
|
|
|
|
- function, // magic kernel function number
|
|
|
|
- (const void*)iRecord, InStructSize,
|
|
|
|
- (void*)buffer, &OutStructSize);
|
|
|
|
--#else // __MAC_OS_X_VERSION_MIN_REQUIRED 1050
|
|
|
|
-- result = IOConnectMethodStructureIStructureO(
|
|
|
|
-- connection,
|
|
|
|
-- function, // magic kernel function number
|
|
|
|
-- iSize, &oSize, iRecord, buffer);
|
|
|
|
--#endif // __MAC_OS_X_VERSION_MIN_REQUIRED 1050
|
|
|
|
-
|
|
|
|
- if (result != KERN_SUCCESS) {
|
|
|
|
- running = NO;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // This returns an NSString describing the current calibration in
|
|
|
|
- // human-readable form. Also include a description of the machine.
|
|
|
|
-@@ -779,29 +772,22 @@ int getData(sms_acceleration* accel, int
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- memset(iRecord, 1, iSize);
|
|
|
|
- memset(oRecord, 0, oSize);
|
|
|
|
-
|
|
|
|
- LOG_2ARG(@" Querying device (%u, %d): ", sensors[sensorNum].function,
|
|
|
|
- sensors[sensorNum].recordSize);
|
|
|
|
-
|
|
|
|
--#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
|
|
|
- const size_t InStructSize = recordSize;
|
|
|
|
- size_t OutStructSize = recordSize;
|
|
|
|
- result = IOConnectCallStructMethod(connection,
|
|
|
|
- function, // magic kernel function number
|
|
|
|
- (const void*)iRecord, InStructSize,
|
|
|
|
- (void*)oRecord, &OutStructSize);
|
|
|
|
--#else // __MAC_OS_X_VERSION_MIN_REQUIRED 1050
|
|
|
|
-- result = IOConnectMethodStructureIStructureO(
|
|
|
|
-- connection,
|
|
|
|
-- function, // magic kernel function number
|
|
|
|
-- iSize, &oSize, iRecord, oRecord);
|
|
|
|
--#endif // __MAC_OS_X_VERSION_MIN_REQUIRED 1050
|
|
|
|
-
|
|
|
|
- if (result != KERN_SUCCESS) {
|
|
|
|
- LOG(@"failed.\n");
|
|
|
|
- running = NO;
|
|
|
|
- return result;
|
|
|
|
- } else {
|
|
|
|
- LOG(@"succeeded.\n");
|
|
|
|
-
|
|
|