Patch for libc/sysdeps/linux/mips/bits/mman.h
Joseph S. Myers
joseph at codesourcery.com
Thu Apr 20 21:21:08 UTC 2006
The MIPS <bits/mman.h> header is missing definitions of POSIX_MADV_*
(present on other targets), as shown up by Open POSIX testing. This
patch, corresponding to one submitted for glibc
<http://sources.redhat.com/ml/libc-ports/2006-04/msg00034.html>, adds the
missing definitions.
Index: libc/sysdeps/linux/mips/bits/mman.h
===================================================================
--- libc/sysdeps/linux/mips/bits/mman.h (revision 14929)
+++ libc/sysdeps/linux/mips/bits/mman.h (working copy)
@@ -80,6 +80,15 @@
#define MADV_DONTNEED 4 /* discard these pages */
#endif
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
--
Joseph S. Myers
joseph at codesourcery.com
More information about the uClibc
mailing list