We use environ so declare it

This commit is contained in:
sin 2013-10-18 10:33:02 +01:00
parent 86566f4ceb
commit f7bfe68a9e
1 changed files with 8 additions and 1 deletions

9
su.c
View File

@ -10,12 +10,16 @@
#include <stdlib.h> #include <stdlib.h>
#include "util.h" #include "util.h"
extern char **environ;
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [username]\n", argv0); eprintf("usage: %s [-l] [username]\n", argv0);
} }
static int lflag = 0;
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
@ -27,6 +31,9 @@ main(int argc, char **argv)
int i; int i;
ARGBEGIN { ARGBEGIN {
case 'l':
lflag = 1;
break;
default: default:
usage(); usage();
} ARGEND; } ARGEND;