diff --git a/UsersTable.c b/UsersTable.c index 6586a4b90..b0f8b7ee7 100644 --- a/UsersTable.c +++ b/UsersTable.c @@ -30,6 +30,7 @@ void UsersTable_delete(UsersTable* this) { } char* UsersTable_getRef(UsersTable* this, unsigned int uid) { +#if !defined(BUILD_STATIC) || !defined(__GLIBC__) char* name = Hashtable_get(this->users, uid); if (name == NULL) { const struct passwd* userData = getpwuid(uid); @@ -39,6 +40,11 @@ char* UsersTable_getRef(UsersTable* this, unsigned int uid) { } } return name; +#else + (void)this; + (void)uid; + return NULL; +#endif } inline void UsersTable_foreach(UsersTable* this, Hashtable_PairFunction f, void* userData) {