aboutsummaryrefslogtreecommitdiffstats
path: root/ports/uids_generic/guts/getpwuid.c
blob: 315647c22c5ffc82f3c02c031fd6e0ae4d92f164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* 
 * Copyright (c) 2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * SPDX-License-Identifier: LGPL-2.1-only
 *
 * static struct passwd *
 * wrap_getpwuid(uid_t uid) {
 *	struct passwd * rc = NULL;
 */
	static struct passwd pwd;
	static char pwbuf[PSEUDO_PWD_MAX];
	int r_rc;

	r_rc = wrap_getpwuid_r(uid, &pwd, pwbuf, PSEUDO_PWD_MAX, &rc);
	/* different error return conventions */
	if (r_rc != 0) {
		errno = r_rc;
	}

/*	return rc;
 * }
 */