# | Line 412 | Line 412 | sg_process_stats *sg_get_process_stats(int *entries){ | |
---|---|---|
412 | return NULL; | |
413 | } | |
414 | p = proctitle; | |
415 | + | #ifdef OPENBSD |
416 | + | /* On OpenBSD, this value has the argv pointers (which |
417 | + | * are terminated by a NULL) at the front, so we have |
418 | + | * to skip over them to get to the strings. */ |
419 | + | while (*(char ***)p != NULL) { |
420 | + | p += sizeof(char **); |
421 | + | } |
422 | + | p += sizeof(char **); |
423 | + | #endif |
424 | proc_state_ptr->proctitle[0] = '\0'; | |
425 | do { | |
426 | sg_strlcat(proc_state_ptr->proctitle, p, size+1); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |