From 5077e83e117b73a223fbbc8dafd850633145cc96 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 4 May 2007 06:13:46 +0000 Subject: [PATCH] * builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of mmap (which might happen on some RTOS). From Savannah patch #5909. --- ChangeLog | 5 +++++ builds/unix/ftsystem.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0b65e89c..f8230130 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-04 harry@kdevelop.org + + * builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of + mmap (which might happen on some RTOS). From Savannah patch #5909. + 2007-05-03 Werner Lemberg * src/base/ftobjs.c (FT_Set_Char_Size): Simplify code. diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index 09dc5b69..f9d25eb1 100644 --- a/builds/unix/ftsystem.c +++ b/builds/unix/ftsystem.c @@ -291,7 +291,8 @@ file, 0 ); - if ( (long)stream->base != -1 ) + /* on some RTOS, mmap might return 0 */ + if ( (long)stream->base != -1 && stream->base != NULL ) stream->close = ft_close_stream_by_munmap; else {