From 7b19f3f446786bd50951a1e9f8ec97bedb68a279 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Thu, 13 May 2021 14:49:17 -0400 Subject: shell_cmds: use libiosexec --- shell_cmds/apply/Makefile | 2 ++ shell_cmds/apply/apply.c | 2 ++ shell_cmds/chroot/Makefile | 2 ++ shell_cmds/chroot/chroot.c | 2 ++ shell_cmds/env/Makefile | 2 ++ shell_cmds/env/env.c | 2 ++ shell_cmds/find/Makefile | 2 ++ shell_cmds/find/function.c | 2 ++ shell_cmds/nice/Makefile | 2 ++ shell_cmds/nice/nice.c | 2 ++ shell_cmds/nohup/Makefile | 2 ++ shell_cmds/nohup/nohup.c | 2 ++ shell_cmds/script/Makefile | 2 ++ shell_cmds/script/script.c | 2 ++ shell_cmds/sh/Makefile | 2 +- shell_cmds/sh/exec.c | 2 ++ shell_cmds/su/Makefile | 2 +- shell_cmds/su/su.c | 2 ++ shell_cmds/systime/Makefile | 2 ++ shell_cmds/systime/systime.c | 2 ++ shell_cmds/time/Makefile | 2 ++ shell_cmds/time/time.c | 2 ++ shell_cmds/xargs/Makefile | 2 ++ shell_cmds/xargs/xargs.c | 2 ++ 24 files changed, 46 insertions(+), 2 deletions(-) diff --git a/shell_cmds/apply/Makefile b/shell_cmds/apply/Makefile index 6c62a46..2eb2434 100644 --- a/shell_cmds/apply/Makefile +++ b/shell_cmds/apply/Makefile @@ -1,3 +1,5 @@ PROG= apply +LDADD+=-liosexec + .include diff --git a/shell_cmds/apply/apply.c b/shell_cmds/apply/apply.c index cf4e9c1..314af66 100644 --- a/shell_cmds/apply/apply.c +++ b/shell_cmds/apply/apply.c @@ -55,6 +55,8 @@ __RCSID("$FreeBSD: src/usr.bin/apply/apply.c,v 1.22 2002/07/14 18:22:12 alfred E #include #include +#include + #define EXEC "exec " static int exec_shell(const char *, char *, char *); diff --git a/shell_cmds/chroot/Makefile b/shell_cmds/chroot/Makefile index eb16239..cc7de4d 100644 --- a/shell_cmds/chroot/Makefile +++ b/shell_cmds/chroot/Makefile @@ -3,4 +3,6 @@ BINDIR=/usr/sbin PROG= chroot MAN= chroot.8 +LDADD+=-liosexec + .include diff --git a/shell_cmds/chroot/chroot.c b/shell_cmds/chroot/chroot.c index c9c38f5..e9ef7c8 100644 --- a/shell_cmds/chroot/chroot.c +++ b/shell_cmds/chroot/chroot.c @@ -58,6 +58,8 @@ __RCSID("$NetBSD: chroot.c,v 1.7 1998/10/06 03:47:51 mrg Exp $"); #include #include +#include + int main __P((int, char **)); void usage __P((void)) __attribute__((__noreturn__)); diff --git a/shell_cmds/env/Makefile b/shell_cmds/env/Makefile index e646986..b21ba8e 100644 --- a/shell_cmds/env/Makefile +++ b/shell_cmds/env/Makefile @@ -1,4 +1,6 @@ PROG= env SRCS= env.c envopts.c +LDADD+=-liosexec + .include diff --git a/shell_cmds/env/env.c b/shell_cmds/env/env.c index 3dc152a..db5f1f6 100644 --- a/shell_cmds/env/env.c +++ b/shell_cmds/env/env.c @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "envopts.h" extern char **environ; diff --git a/shell_cmds/find/Makefile b/shell_cmds/find/Makefile index 22bfbad..d632d5d 100644 --- a/shell_cmds/find/Makefile +++ b/shell_cmds/find/Makefile @@ -1,4 +1,6 @@ PROG= find SRCS= find.c function.c getdate.y ls.c main.c misc.c operator.c option.c +LDADD+=-liosexec + .include diff --git a/shell_cmds/find/function.c b/shell_cmds/find/function.c index a673a02..3ea53a2 100644 --- a/shell_cmds/find/function.c +++ b/shell_cmds/find/function.c @@ -71,6 +71,8 @@ __FBSDID("$FreeBSD: src/usr.bin/find/function.c,v 1.71 2011/06/13 05:22:07 avata #define COMPAT_MODE(func, mode) 1 #endif +#include + #include "find.h" static PLAN *palloc(OPTION *); diff --git a/shell_cmds/nice/Makefile b/shell_cmds/nice/Makefile index 4098b3b..24e9617 100644 --- a/shell_cmds/nice/Makefile +++ b/shell_cmds/nice/Makefile @@ -1,3 +1,5 @@ PROG= nice +LDADD+=-liosexec + .include diff --git a/shell_cmds/nice/nice.c b/shell_cmds/nice/nice.c index 62a197e..7f8d1fc 100644 --- a/shell_cmds/nice/nice.c +++ b/shell_cmds/nice/nice.c @@ -59,6 +59,8 @@ __RCSID("$NetBSD: nice.c,v 1.10 1997/10/19 06:28:04 lukem Exp $"); #include #include +#include + #define DEFNICE 10 int main __P((int, char **)); diff --git a/shell_cmds/nohup/Makefile b/shell_cmds/nohup/Makefile index 5698f6a..2246f0d 100644 --- a/shell_cmds/nohup/Makefile +++ b/shell_cmds/nohup/Makefile @@ -1,3 +1,5 @@ PROG= nohup +LDADD+=-liosexec + .include diff --git a/shell_cmds/nohup/nohup.c b/shell_cmds/nohup/nohup.c index 021361c..f33e21b 100644 --- a/shell_cmds/nohup/nohup.c +++ b/shell_cmds/nohup/nohup.c @@ -62,6 +62,8 @@ __FBSDID("$FreeBSD: src/usr.bin/nohup/nohup.c,v 1.10 2003/05/03 19:44:46 obrien #include #endif +#include + static void dofile(void); static void usage(void); diff --git a/shell_cmds/script/Makefile b/shell_cmds/script/Makefile index f70b986..0d600f8 100644 --- a/shell_cmds/script/Makefile +++ b/shell_cmds/script/Makefile @@ -1,3 +1,5 @@ PROG= script +LDADD+=-liosexec + .include diff --git a/shell_cmds/script/script.c b/shell_cmds/script/script.c index 90e895e..495cc12 100644 --- a/shell_cmds/script/script.c +++ b/shell_cmds/script/script.c @@ -69,6 +69,8 @@ static const char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #include #include +#include + #define DEF_BUF 65536 struct stamp { diff --git a/shell_cmds/sh/Makefile b/shell_cmds/sh/Makefile index 215e1e2..3035351 100644 --- a/shell_cmds/sh/Makefile +++ b/shell_cmds/sh/Makefile @@ -19,7 +19,7 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -LDADD=-ledit +LDADD=-ledit -liosexec CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: diff --git a/shell_cmds/sh/exec.c b/shell_cmds/sh/exec.c index ae3cf6e..eb279f2 100644 --- a/shell_cmds/sh/exec.c +++ b/shell_cmds/sh/exec.c @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD: head/bin/sh/exec.c 317882 2017-05-06 13:28:42Z jilles $"); #include #include +#include + /* * When commands are first encountered, they are entered in a hash table. * This ensures that a full path search will not have to be done for them diff --git a/shell_cmds/su/Makefile b/shell_cmds/su/Makefile index e7ae615..7bc56fb 100644 --- a/shell_cmds/su/Makefile +++ b/shell_cmds/su/Makefile @@ -1,5 +1,5 @@ PROG= su -LDADD=-lpam +LDADD=-lpam -liosexec .include diff --git a/shell_cmds/su/su.c b/shell_cmds/su/su.c index 8ad7434..a03ad3b 100644 --- a/shell_cmds/su/su.c +++ b/shell_cmds/su/su.c @@ -109,6 +109,8 @@ __FBSDID("$FreeBSD: src/usr.bin/su/su.c,v 1.91 2009/12/13 03:14:06 delphij Exp $ #include #endif /* __APPLE__ */ +#include + #define PAM_END() do { \ int local_ret; \ if (pamh != NULL) { \ diff --git a/shell_cmds/systime/Makefile b/shell_cmds/systime/Makefile index d7f9881..c6065f3 100644 --- a/shell_cmds/systime/Makefile +++ b/shell_cmds/systime/Makefile @@ -1,3 +1,5 @@ PROG= systime +LDADD+=-liosexec + .include diff --git a/shell_cmds/systime/systime.c b/shell_cmds/systime/systime.c index 37cee8b..555fc6a 100644 --- a/shell_cmds/systime/systime.c +++ b/shell_cmds/systime/systime.c @@ -32,6 +32,8 @@ #include #include +#include + static void usage(void); static void do_print(void); static void do_difftime(bool usepercent, uint64_t *olduser, uint64_t *oldsystem, uint64_t *oldidle); diff --git a/shell_cmds/time/Makefile b/shell_cmds/time/Makefile index a91e94f..f2c8284 100644 --- a/shell_cmds/time/Makefile +++ b/shell_cmds/time/Makefile @@ -1,3 +1,5 @@ PROG= time +LDADD+=-liosexec + .include diff --git a/shell_cmds/time/time.c b/shell_cmds/time/time.c index afaaed0..78bf4ca 100644 --- a/shell_cmds/time/time.c +++ b/shell_cmds/time/time.c @@ -53,6 +53,8 @@ #include #include +#include + int lflag; int portableflag; bool child_running = true; diff --git a/shell_cmds/xargs/Makefile b/shell_cmds/xargs/Makefile index 58d417a..a316efb 100644 --- a/shell_cmds/xargs/Makefile +++ b/shell_cmds/xargs/Makefile @@ -1,4 +1,6 @@ PROG= xargs SRCS= strnsubst.c xargs.c +LDADD+=-liosexec + .include diff --git a/shell_cmds/xargs/xargs.c b/shell_cmds/xargs/xargs.c index a1ee480..1b71a6d 100644 --- a/shell_cmds/xargs/xargs.c +++ b/shell_cmds/xargs/xargs.c @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "pathnames.h" #ifdef __APPLE__ -- cgit v1.2.3-56-ge451