From 45d2ed830766c316138a7910b1bde96e32719349 Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Tue, 13 Jan 2009 15:21:35 +1100 Subject: [BUILD] Fixed build on OS X Hi, Herbert and friends. I've created a small patch that allows dash to be built on Mac OS X. I'm contributing it here with the hope that it's suitable for inclusion in dash. The changes in this patch are: - __attribute__((__alias__())) is not supported, add an autoconf check - open64 is not present although the stat64 family is, separate the autoconf checks - A syntax error had slipped into a non-glibc codepath - mkbuiltins had a nonportable mktemp invocation for the case where tempfile is not availalble Nothing in this patch is actually Mac OS X-specific, so it might aid portability to other platforms as well. Signed-off-by: Herbert Xu --- src/jobs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/jobs.c') diff --git a/src/jobs.c b/src/jobs.c index 40dc8f6..2b6a752 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -361,7 +361,14 @@ fgcmd(int argc, char **argv) return retval; } -int bgcmd(int, char **) __attribute__((__alias__("fgcmd"))); +int bgcmd(int argc, char **argv) +#ifdef HAVE_ALIAS_ATTRIBUTE + __attribute__((__alias__("fgcmd"))); +#else +{ + return fgcmd(argc, argv); +} +#endif STATIC int -- cgit 1.4.1