diff --git a/proc/pwcache.c b/proc/pwcache.c index e20ba666..f2512515 100644 --- a/proc/pwcache.c +++ b/proc/pwcache.c @@ -26,9 +26,11 @@ #include #include #include +#include + #include "alloc.h" #include "pwcache.h" -#include +#include "procps-private.h" // might as well fill cache lines... else we waste memory anyway @@ -41,7 +43,7 @@ static struct pwbuf { char name[P_G_SZ]; } *pwhash[HASHSIZE]; -char *user_from_uid(uid_t uid) { +PROCPS_EXPORT char *user_from_uid(uid_t uid) { struct pwbuf **p; struct passwd *pw; @@ -69,7 +71,7 @@ static struct grpbuf { char name[P_G_SZ]; } *grphash[HASHSIZE]; -char *group_from_gid(gid_t gid) { +PROCPS_EXPORT char *group_from_gid(gid_t gid) { struct grpbuf **g; struct group *gr; diff --git a/proc/pwcache.h b/proc/pwcache.h index 2a8be83b..1fab493b 100644 --- a/proc/pwcache.h +++ b/proc/pwcache.h @@ -9,8 +9,8 @@ __BEGIN_DECLS // used in pwcache and in readproc to set size of username or groupname #define P_G_SZ 33 -extern char *user_from_uid(uid_t uid); -extern char *group_from_gid(gid_t gid); +char *user_from_uid(uid_t uid); +char *group_from_gid(gid_t gid); __END_DECLS