diff -Nru util-vserver-0.30.215.orig/lib_internal/unify-copy.c util-vserver-0.30.215/lib_internal/unify-copy.c --- util-vserver-0.30.215.orig/lib_internal/unify-copy.c 2008-03-17 09:59:50.000000000 +0100 +++ util-vserver-0.30.215/lib_internal/unify-copy.c 2008-06-17 15:38:50.000000000 +0200 @@ -132,8 +132,8 @@ buf_size = in_len - offset; if (buf_size > MMAP_BLOCKSIZE) buf_size = MMAP_BLOCKSIZE; - if ((in_buf = mmap(0, buf_size, PROT_READ, MAP_SHARED, in_fd, offset))==0 || - (out_buf = mmap(0, buf_size, PROT_WRITE, MAP_SHARED, out_fd, offset))==0) { + if ((in_buf = mmap(0, buf_size, PROT_READ, MAP_SHARED, in_fd, offset))==MAP_FAILED || + (out_buf = mmap(0, buf_size, PROT_WRITE, MAP_SHARED, out_fd, offset))==MAP_FAILED) { perror("mmap()"); goto out; } diff -Nru util-vserver-0.30.215.orig/src/check-unixfile.c util-vserver-0.30.215/src/check-unixfile.c --- util-vserver-0.30.215.orig/src/check-unixfile.c 2008-03-17 09:59:45.000000000 +0100 +++ util-vserver-0.30.215/src/check-unixfile.c 2008-06-17 15:39:11.000000000 +0200 @@ -73,7 +73,7 @@ } else if (l>0) { data = mmap(0, l, PROT_READ, MAP_PRIVATE, fd, 0); - if (data==0) { + if (data==MAP_FAILED) { perror("mmap()"); exit(wrapper_exit_code); } diff -Nru util-vserver-0.30.215.orig/src/h2ext.c util-vserver-0.30.215/src/h2ext.c --- util-vserver-0.30.215.orig/src/h2ext.c 2008-03-17 09:59:45.000000000 +0100 +++ util-vserver-0.30.215/src/h2ext.c 2008-06-17 15:39:41.000000000 +0200 @@ -148,7 +148,7 @@ fd = EopenD(file, O_RDONLY, 0); Efstat(fd, &st); mapping = mmap(NULL, MIN(st.st_size, MAX_PEEK_SIZE), PROT_READ, MAP_SHARED, fd, 0); - if (!mapping) { + if (mapping == MAP_FAILED) { perror("mmap()"); Eclose(fd); return -1; diff -Nru util-vserver-0.30.215.orig/src/testsuite/hashcalc-plain.c util-vserver-0.30.215/src/testsuite/hashcalc-plain.c --- util-vserver-0.30.215.orig/src/testsuite/hashcalc-plain.c 2008-03-17 09:59:45.000000000 +0100 +++ util-vserver-0.30.215/src/testsuite/hashcalc-plain.c 2008-06-17 15:40:08.000000000 +0200 @@ -76,7 +76,7 @@ void const * buf; if (buf_size>HASH_BLOCKSIZE) buf_size = HASH_BLOCKSIZE; - assert((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))!=0); + assert((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))!=MAP_FAILED); offset += buf_size; assert(ensc_crypto_hashctx_update(&hash_context, buf, buf_size)!=-1); munmap((void *)(buf), buf_size); diff -Nru util-vserver-0.30.215.orig/src/vhashify.c util-vserver-0.30.215/src/vhashify.c --- util-vserver-0.30.215.orig/src/vhashify.c 2008-03-17 09:59:45.000000000 +0100 +++ util-vserver-0.30.215/src/vhashify.c 2008-06-17 15:40:28.000000000 +0200 @@ -332,7 +332,7 @@ buf_size = size-offset; if (buf_size>HASH_BLOCKSIZE) buf_size = HASH_BLOCKSIZE; - if ((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))==0) { + if ((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))==MAP_FAILED) { perror("mmap()"); goto out; }