diff --git a/Build.sh b/Build.sh index b8ec4a5..8e6e4dd 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.312 2008/04/01 20:40:20 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.313 2008/04/02 16:55:05 tg Exp $' #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI @@ -1013,8 +1013,8 @@ ac_test flock_ex '' 'flock and mmap' <<-'EOF' #include #include #include - int main(void) { return (mmap(NULL, flock(0, LOCK_EX), PROT_READ, - MAP_PRIVATE, 0, 0) == NULL ? 1 : 0); } + int main(void) { return ((void *)mmap(NULL, flock(0, LOCK_EX), + PROT_READ, MAP_PRIVATE, 0, 0) == (void *)NULL ? 1 : 0); } EOF ac_test mkstemp <<-'EOF' diff --git a/histrap.c b/histrap.c index 7ae2fbb..99b7d5d 100644 --- a/histrap.c +++ b/histrap.c @@ -3,7 +3,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.59 2008/03/27 17:59:28 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.60 2008/04/02 16:55:06 tg Exp $"); /*- * MirOS: This is the default mapping type, and need not be specified. @@ -663,8 +663,8 @@ hist_init(Source *s) /* * we have some data */ - base = mmap(NULL, hsize, PROT_READ, MAP_FILE | MAP_PRIVATE, - histfd, 0); + base = (void *)mmap(NULL, hsize, PROT_READ, + MAP_FILE | MAP_PRIVATE, histfd, 0); /* * check on its validity */ @@ -893,7 +893,7 @@ writehistfile(int lno, char *cmd) if (sizenow > hsize) { /* someone has added some lines */ bytes = sizenow - hsize; - base = mmap(NULL, sizenow, PROT_READ, + base = (void *)mmap(NULL, sizenow, PROT_READ, MAP_FILE | MAP_PRIVATE, histfd, 0); if (base == (unsigned char *)MAP_FAILED) goto bad; diff --git a/sh.h b/sh.h index ffc99c2..ab46735 100644 --- a/sh.h +++ b/sh.h @@ -8,7 +8,7 @@ /* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */ /* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */ -#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.201 2008/04/01 22:20:19 tg Exp $" +#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.202 2008/04/02 16:55:06 tg Exp $" #define MKSH_VERSION "R33 2008/04/01" #if HAVE_SYS_PARAM_H @@ -184,7 +184,7 @@ typedef int bool; #if !defined(MAP_FAILED) # if defined(__linux) #define MAP_FAILED ((void *)-1) -# elif defined(__bsdi__) +# elif defined(__bsdi__) || defined(__ultrix) #define MAP_FAILED ((caddr_t)-1) # endif #endif