Skip to content

Commit

Permalink
fix os x
Browse files Browse the repository at this point in the history
  • Loading branch information
ksjogo committed Jul 21, 2016
1 parent 69fbcff commit 52e5c71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion objc/NSData+Nu.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ + (NSData *) dataWithShellCommand:(NSString *) command standardInput:(id) input
else {
fullCommand = [NSString stringWithFormat:@"%@ > %@", command, outputFileName];
}
const char *commandString = [[fullCommand stringValue] cStringUsingEncoding:NSUTF8StringEncoding];
const char *commandString = [fullCommand cStringUsingEncoding:NSUTF8StringEncoding];
int result = system(commandString) >> 8; // this needs an explanation
if (!result)
returnValue = [NSData dataWithContentsOfFile:outputFileName];
Expand Down
2 changes: 1 addition & 1 deletion objc/NuBridgedBlock.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static void objc_calling_nu_block_handler(ffi_cif* cif, void* returnvalue, void*
NSLog(@"unable to prepare closure for signature %s (ffi_prep_closure failed)", signature);
return NULL;
}
#ifdef TARGET_OS_IPHONE
#if TARGET_OS_IPHONE
return funcPtr;
#else
if (mprotect(closure, sizeof(closure), PROT_READ | PROT_EXEC) == -1) {
Expand Down

0 comments on commit 52e5c71

Please sign in to comment.