Merge pull request #519 from ProsoftEngineering/suppress-deprecated-warning

Suppress AuthorizationExecuteWithPrivileges deprecated warning
This commit is contained in:
Kornel committed 2015-04-19 15:30:49 +01:00
commit 5890ec6cfe
1 file changed
+3
+3
View File
@@ -28,8 +28,11 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
sig_t oldSigChildHandler = signal(SIGCHLD, SIG_DFL);
BOOL returnValue = YES;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
/* AuthorizationExecuteWithPrivileges used to support 10.4+; should be replaced with XPC or external process */
if (AuthorizationExecuteWithPrivileges(authorization, executablePath, options, (char* const*)arguments, NULL) == errAuthorizationSuccess)
#pragma clang diagnostic pop
{
int status = 0;
pid_t pid = wait(&status);