[uClibc]mman.h patch suggestion
michaels at jungo.com
michaels at jungo.com
Sun Feb 11 13:19:02 UTC 2001
Hello,
from "man 2 mmap" I see:
RETURN VALUE
On success, mmap returns a pointer to the mapped area. On
error, MAP_FAILED (-1) is returned, and errno is set
appropriately. On success, munmap returns 0, on failure
-1, and errno is set (probably to EINVAL).
currently I see no MAP_FAILED in mman.h. Therefore I suggest following
minimal patch to do the job.
Sincerely yours,
Michael Shmulevich
______________________________________
Software Developer
Jungo - R&D
email: michaels at jungo.com
web: http://www.jungo.com
Phone: 1-877-514-0537(USA) +972-9-8859365(Worldwide) ext. 233
Fax: 1-877-514-0538(USA) +972-9-8859366(Worldwide)
-------------- next part --------------
Index: mman.h
===================================================================
RCS file: /var/cvs/uClibc/include/sys/mman.h,v
retrieving revision 1.1.1.1
diff -u -d -B -r1.1.1.1 mman.h
--- mman.h 2000/05/14 04:16:36 1.1.1.1
+++ mman.h 2001/02/11 13:18:03
@@ -12,6 +12,8 @@
#define MAP_FILE 0x00 /* The 'normal' way: mapped from file */
#endif
+#define MAP_FAILED ((__ptr_t) -1) /* Return value of `mmap' in case of an error. */
+
__BEGIN_DECLS
extern __ptr_t mmap __P((__ptr_t __addr, size_t __len,
More information about the uClibc
mailing list