diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-07 03:29:55 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-07 03:29:55 +0100 |
commit | 2b6bf07dd23bb467099d213c97b3875c5e453491 (patch) | |
tree | 2127e24f28714b48f6c00e92eaec351bcb57e5d5 /src/shared/utmp-wtmp.c | |
parent | systemctl: check the value from start_unit_one (diff) | |
download | systemd-2b6bf07dd23bb467099d213c97b3875c5e453491.tar.xz systemd-2b6bf07dd23bb467099d213c97b3875c5e453491.zip |
Get rid of our reimplementation of basename
The only problem is that libgen.h #defines basename to point to it's
own broken implementation instead of the GNU one. This can be fixed
by #undefining basename.
Diffstat (limited to 'src/shared/utmp-wtmp.c')
-rw-r--r-- | src/shared/utmp-wtmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c index 5d88405e13..4a3a3f4dd3 100644 --- a/src/shared/utmp-wtmp.c +++ b/src/shared/utmp-wtmp.c @@ -216,7 +216,7 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line strncpy(store.ut_id, sanitize_id(id), sizeof(store.ut_id)); if (line) - strncpy(store.ut_line, path_get_file_name(line), sizeof(store.ut_line)); + strncpy(store.ut_line, basename(line), sizeof(store.ut_line)); return write_entry_both(&store); } |