ref: 5077e83e117b73a223fbbc8dafd850633145cc96
parent: 106eaf1dbb23223e4e72d27a81e7e035268a3a87
author: Werner Lemberg <[email protected]>
date: Fri May 4 02:13:46 EDT 2007
* builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of mmap (which might happen on some RTOS). From Savannah patch #5909.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-04 [email protected]
+
+ * 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 <[email protected]>
* src/base/ftobjs.c (FT_Set_Char_Size): Simplify code.
--- 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
{