Fix mac build with gcc 7.1

This commit is contained in:
Sajjad Pourali 2017-05-27 14:48:20 +04:30 committed by pancake
parent d17ba081c1
commit 929a622cb0
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ static void cmd_debug_reg(RCore *core, const char *str);
static void recursive_help(RCore *core, const char *cmd) {
char *nl, *line;
if (strchr (cmd, '[')) {
eprintf ("Skip ((%s))\n", cmd);
// eprintf ("Skip ((%s))\n", cmd);
return;
}
char *msg = r_core_cmd_str (core, cmd);

View File

@ -793,8 +793,8 @@ static uid_t uidFromPid(pid_t pid) {
size_t procBufferSize = sizeof (process);
// Compose search path for sysctl. Here you can specify PID directly.
const u_int pathLenth = 4;
int path[pathLenth] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid};
int path[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid};
const int pathLenth = (sizeof (path) / sizeof (int));
int sysctlResult = sysctl (path, pathLenth, &process, &procBufferSize, NULL, 0);
// If sysctl did not fail and process with PID available - take UID.
if ((sysctlResult == 0) && (procBufferSize != 0)) {