X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/7246dc4381c6c95454672a5c1aff65a02d6d3747..d42870d6ca7fb587b38f8cf6d6821ae33a53a696:/components/user.c?ds=sidebyside diff --git a/components/user.c b/components/user.c index 8dcb86a..b335dc3 100644 --- a/components/user.c +++ b/components/user.c @@ -1,6 +1,8 @@ /* See LICENSE file for copyright and license details. */ -#include +#include #include +#include +#include #include #include @@ -18,7 +20,7 @@ username(void) struct passwd *pw = getpwuid(geteuid()); if (pw == NULL) { - warn("Failed to get username"); + fprintf(stderr, "getpwuid '%d': %s\n", geteuid(), strerror(errno)); return NULL; }