aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/netstat.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-04-08 18:25:59 -0500
committerRob Landley <rob@landley.net>2016-04-08 18:25:59 -0500
commit1c028ca33dc059a9d8f18daafcd77b5950268f41 (patch)
treef1a6ac81fdecd28b72a864d20c5e65f18b302ee3 /toys/pending/netstat.c
parent9b93dd397b4a00063073fdbd59b181a508470e70 (diff)
downloadtoybox-1c028ca33dc059a9d8f18daafcd77b5950268f41.tar.gz
Redefining basename_r to mean something random seems popular (bionic and freebsd
both did it) so use getbasename instead.
Diffstat (limited to 'toys/pending/netstat.c')
-rw-r--r--toys/pending/netstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/netstat.c b/toys/pending/netstat.c
index d6acd7a3..02ab4fc2 100644
--- a/toys/pending/netstat.c
+++ b/toys/pending/netstat.c
@@ -440,7 +440,7 @@ static void scan_pid(int pid)
if ((p = strchr(line, ' '))) *p = 0; // "/bin/netstat -ntp" -> "/bin/netstat"
snprintf(TT.current_name, sizeof(TT.current_name), "%d/%s",
- pid, basename_r(line)); // "584/netstat"
+ pid, getbasename(line)); // "584/netstat"
free(line);
fd_dir = xmprintf("/proc/%d/fd", pid);