mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-24 14:54:54 +00:00
Fix mac build with gcc 7.1
This commit is contained in:
parent
d17ba081c1
commit
929a622cb0
@ -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);
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user