summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-02 05:50:52 -0500
committerKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-02 05:50:52 -0500
commit9a7852569e3e0d5b404578e50bb0d918d252240a (patch)
tree835d9eef1e31096d95e7b2fb803509a4e9795b87 /usr.bin
parenta8c4823ecc2869a4fb71eb2cf6c5e53abe2f7233 (diff)
downloaduserland-9a7852569e3e0d5b404578e50bb0d918d252240a.tar.gz
userland-9a7852569e3e0d5b404578e50bb0d918d252240a.tar.bz2
userland-9a7852569e3e0d5b404578e50bb0d918d252240a.tar.xz
userland-9a7852569e3e0d5b404578e50bb0d918d252240a.zip
usr.bin/id: make buildable with libbsd
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/id/id.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/usr.bin/id/id.c b/usr.bin/id/id.c
index 720cc49..4c7aa71 100644
--- a/usr.bin/id/id.c
+++ b/usr.bin/id/id.c
@@ -27,20 +27,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1991, 1993\
- The Regents of the University of California. All rights reserved.");
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)id.c 8.3 (Berkeley) 4/28/95";
-#else
-__RCSID("$NetBSD: id.c,v 1.32 2011/09/16 15:39:26 joerg Exp $");
-#endif
-#endif /* not lint */
-
#include <sys/param.h>
#include <err.h>
@@ -49,13 +35,14 @@ __RCSID("$NetBSD: id.c,v 1.32 2011/09/16 15:39:26 joerg Exp $");
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <bsd/stdlib.h>
#include <string.h>
#include <unistd.h>
static void current(void);
static void pretty(struct passwd *);
static void group(struct passwd *, int);
-__dead static void usage(void);
+static void usage(void);
static void user(struct passwd *);
static struct passwd *who(char *);
@@ -177,7 +164,7 @@ static void
pretty(struct passwd *pw)
{
struct group *gr;
- u_int eid, rid;
+ unsigned int eid, rid;
char *login;
if (pw) {
@@ -265,7 +252,7 @@ user(struct passwd *pw)
id = pw->pw_uid;
(void)printf("uid=%u(%s)", id, pw->pw_name);
- (void)printf(" gid=%lu", (u_long)pw->pw_gid);
+ (void)printf(" gid=%lu", (unsigned long)pw->pw_gid);
if ((gr = getgrgid(pw->pw_gid)) != NULL)
(void)printf("(%s)", gr->gr_name);
ngroups = maxgroups + 1;