diff --git a/src/ChangeLog b/src/ChangeLog index f5ee64b2..cf6d5275 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-06-14 Hrvoje Niksic + + * sysdep.h (MAP_FAILED): Provide MAP_FAILED for systems that don't + define it. + 2001-06-09 Jan Prikryl * ftp.h: Provide correct prototype for ftp_parse_ls(). diff --git a/src/sysdep.h b/src/sysdep.h index 52db05da..6568980a 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -178,4 +178,14 @@ void *memcpy (); #endif /* sun */ #endif /* STDC_HEADERS */ +/* Some systems don't provide MAP_FAILED, a symbolic constant for the + value returned by mmap() when it doesn't work. Usually, this + constant should be -1. This only makes sense for files that use + mmap() and include sys/mman.h *before* sysdep.h, but doesn't hurt + others. */ + +#ifndef MAP_FAILED +# define MAP_FAILED ((void *) -1) +#endif + #endif /* SYSDEP_H */