diff --git a/src/cmd/ksh93/sh/main.c b/src/cmd/ksh93/sh/main.c index 96fe68846..6c6fc41f7 100644 --- a/src/cmd/ksh93/sh/main.c +++ b/src/cmd/ksh93/sh/main.c @@ -52,7 +52,7 @@ /* These routines are referenced by this module */ static void exfile(Shell_t*, Sfio_t*,int); static void chkmail(Shell_t *shp, char*); -#if defined(_lib_fork) && !defined(_NEXT_SOURCE) && !defined(__FreeBSD__) +#if defined(_lib_fork) && !defined(_NEXT_SOURCE) && !defined(__FreeBSD__) && !defined(__sun) static void fixargs(char**,int); #else # define fixargs(a,b) @@ -697,7 +697,7 @@ static void chkmail(Shell_t *shp, char *files) # define PSTAT 1 #endif -#if defined(_lib_fork) && !defined(_NEXT_SOURCE) && !defined(__FreeBSD__) +#if defined(_lib_fork) && !defined(_NEXT_SOURCE) && !defined(__FreeBSD__) && !defined(__sun) /* * fix up command line for ps command * diff --git a/src/cmd/ksh93/tests/basic.sh b/src/cmd/ksh93/tests/basic.sh index fd43a0b69..a517400c7 100755 --- a/src/cmd/ksh93/tests/basic.sh +++ b/src/cmd/ksh93/tests/basic.sh @@ -708,7 +708,7 @@ getPsOutput() { while [[ $actual == [[:space:]]* ]]; do actual=${actual#?}; done while [[ $actual == *[[:space:]] ]]; do actual=${actual%?}; done } -if [[ $(uname -s) != FreeBSD ]] && +if [[ ! $(uname -s) =~ ^(FreeBSD|SunOS)$ ]] && getPsOutput "$$" && [[ "$SHELL $0" == "$actual"* ]] # "$SHELL $0" is how shtests invokes this script then expect='./atest 1 2'