library: export pwcache functions correctly
This commit is contained in:
parent
cbf25b93e3
commit
7a7cf686ec
@ -26,9 +26,11 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#include <grp.h>
|
||||||
|
|
||||||
#include "alloc.h"
|
#include "alloc.h"
|
||||||
#include "pwcache.h"
|
#include "pwcache.h"
|
||||||
#include <grp.h>
|
#include "procps-private.h"
|
||||||
|
|
||||||
// might as well fill cache lines... else we waste memory anyway
|
// might as well fill cache lines... else we waste memory anyway
|
||||||
|
|
||||||
@ -41,7 +43,7 @@ static struct pwbuf {
|
|||||||
char name[P_G_SZ];
|
char name[P_G_SZ];
|
||||||
} *pwhash[HASHSIZE];
|
} *pwhash[HASHSIZE];
|
||||||
|
|
||||||
char *user_from_uid(uid_t uid) {
|
PROCPS_EXPORT char *user_from_uid(uid_t uid) {
|
||||||
struct pwbuf **p;
|
struct pwbuf **p;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
@ -69,7 +71,7 @@ static struct grpbuf {
|
|||||||
char name[P_G_SZ];
|
char name[P_G_SZ];
|
||||||
} *grphash[HASHSIZE];
|
} *grphash[HASHSIZE];
|
||||||
|
|
||||||
char *group_from_gid(gid_t gid) {
|
PROCPS_EXPORT char *group_from_gid(gid_t gid) {
|
||||||
struct grpbuf **g;
|
struct grpbuf **g;
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ __BEGIN_DECLS
|
|||||||
// used in pwcache and in readproc to set size of username or groupname
|
// used in pwcache and in readproc to set size of username or groupname
|
||||||
#define P_G_SZ 33
|
#define P_G_SZ 33
|
||||||
|
|
||||||
extern char *user_from_uid(uid_t uid);
|
char *user_from_uid(uid_t uid);
|
||||||
extern char *group_from_gid(gid_t gid);
|
char *group_from_gid(gid_t gid);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user