Skip to content

Commit

Permalink
Merge pull request #1398 from brauner/fixes
Browse files Browse the repository at this point in the history
cgo/process_utils: fix 32bit builds
  • Loading branch information
stgraber authored Nov 19, 2024
2 parents e8fde09 + afa91aa commit b5264de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shared/cgo/process_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,11 @@ static inline int setproctitle(char *title)
ret = prctl(PR_SET_MM, prctl_arg(PR_SET_MM_MAP), prctl_arg(&prctl_map),
prctl_arg(sizeof(prctl_map)), prctl_arg(0));
if (ret == 0) {
char *dest = (char *)arg_start;
char *dest;

dest = (char *)(uintptr_t)arg_start;
memcpy(dest, title, len - 1);
dest[len-1] = '\0';
dest[len - 1] = '\0';
}

return ret;
Expand Down

0 comments on commit b5264de

Please sign in to comment.