summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-12-04 13:46:33 +0300
committerIgor Pashev <pashev.igor@gmail.com>2016-12-04 13:46:33 +0300
commit5a8e0256ecf276956faab99e62d6c7118eb04ef5 (patch)
tree7986195bbe9c8606df130d0558c88116f5f64995
parent48f9f10d752fb500b8eeae05821093396ba2c73b (diff)
downloadillumos-packaging-5a8e0256ecf276956faab99e62d6c7118eb04ef5.tar.gz
sys/mmap.h: expose getpagesizes & mmapobj
-rw-r--r--uts/debian/changelog8
-rw-r--r--uts/debian/patches/sys_mman.h.patch57
2 files changed, 53 insertions, 12 deletions
diff --git a/uts/debian/changelog b/uts/debian/changelog
index 50e4ef1..50b5f4c 100644
--- a/uts/debian/changelog
+++ b/uts/debian/changelog
@@ -1,8 +1,8 @@
-uts (5.10.18.git.2a44663-1) UNRELEASED; urgency=medium
+uts (6.12.03.git.55a424c-1) UNRELEASED; urgency=medium
- * sys/mman.h: expose memcntl, renamed:
- debian/patches/sys_mman.h-bsd_source.patch ->
- debian/patches/sys_mman.h.patch
+ * sys/mman.h: expose memcntl, getpagesizes, mmapobj,
+ renamed: debian/patches/sys_mman.h-bsd_source.patch ->
+ debian/patches/sys_mman.h.patch
-- Igor Pashev <pashev.igor@gmail.com> Wed, 21 Oct 2015 16:15:41 +0300
diff --git a/uts/debian/patches/sys_mman.h.patch b/uts/debian/patches/sys_mman.h.patch
index f6e094f..f749d8a 100644
--- a/uts/debian/patches/sys_mman.h.patch
+++ b/uts/debian/patches/sys_mman.h.patch
@@ -2,25 +2,66 @@ Index: uts/usr/src/uts/common/sys/mman.h
===================================================================
--- uts.orig/usr/src/uts/common/sys/mman.h
+++ uts/usr/src/uts/common/sys/mman.h
-@@ -230,6 +230,7 @@ extern int munmap(void *, size_t);
+@@ -220,49 +220,26 @@ typedef struct mmapobj_result32 {
+ #define getpagesizes getpagesizes2
+ #endif
+
+-/*
+- * Except for old binaries mmap() will return the resultant
+- * address of mapping on success and (caddr_t)-1 on error.
+- */
+-#if (_POSIX_C_SOURCE > 2) || defined(_XPG4_2)
+ extern void *mmap(void *, size_t, int, int, int, off_t);
+ extern int munmap(void *, size_t);
extern int mprotect(void *, size_t, int);
extern int msync(void *, size_t, int);
- #if (!defined(_XPG4_2) || (_POSIX_C_SOURCE > 2)) || defined(__EXTENSIONS__)
+-#if (!defined(_XPG4_2) || (_POSIX_C_SOURCE > 2)) || defined(__EXTENSIONS__)
++#if defined(__EXTENSIONS__)
++extern int getpagesizes(size_t *, int);
++extern int getpagesizes2(size_t *, int);
+extern int memcntl(void *, size_t, int, void *, int, int);
extern int mlock(const void *, size_t);
++extern int mmapobj(int, uint_t, mmapobj_result_t *, uint_t *, void *);
extern int munlock(const void *, size_t);
- #endif /* (!defined(_XPG4_2) || (_POSIX_C_SOURCE > 2))... */
-@@ -238,6 +239,9 @@ extern int munlock(const void *, size_t)
+-#endif /* (!defined(_XPG4_2) || (_POSIX_C_SOURCE > 2))... */
++#endif
+ /* transitional large file interface version */
+ #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
!defined(__PRAGMA_REDEFINE_EXTNAME))
extern void *mmap64(void *, size_t, int, int, int, off64_t);
#endif /* _LARGEFILE64_SOURCE... */
+-#else /* (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) */
+-extern caddr_t mmap(caddr_t, size_t, int, int, int, off_t);
+-extern int munmap(caddr_t, size_t);
+-extern int mprotect(caddr_t, size_t, int);
+-extern int msync(caddr_t, size_t, int);
+-extern int mlock(caddr_t, size_t);
+-extern int munlock(caddr_t, size_t);
+-extern int mincore(caddr_t, size_t, char *);
+-extern int memcntl(caddr_t, size_t, int, caddr_t, int, int);
+-extern int madvise(caddr_t, size_t, int);
+-#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
+-extern int getpagesizes(size_t *, int);
+-extern int getpagesizes2(size_t *, int);
+-extern int mmapobj(int, uint_t, mmapobj_result_t *, uint_t *, void *);
+-/* guard visibility of uint64_t */
+-#if defined(_INT64_TYPE)
+-extern int meminfo(const uint64_t *, int, const uint_t *, int, uint64_t *,
+- uint_t *);
+-#endif /* defined(_INT64_TYPE) */
+-#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
+-/* transitional large file interface version */
+-#ifdef _LARGEFILE64_SOURCE
+-extern caddr_t mmap64(caddr_t, size_t, int, int, int, off64_t);
+-#endif
+-#endif /* (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) */
+#if defined(_BSD_SOURCE) || defined(__EXTENSIONS__)
+extern int madvise(void *, size_t, int);
+#endif /* _BSD_SOURCE */
- #else /* (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) */
- extern caddr_t mmap(caddr_t, size_t, int, int, int, off_t);
- extern int munmap(caddr_t, size_t);
-@@ -302,7 +306,7 @@ struct memcntl_mha32 {
+
+ #if (!defined(_XPG4_2) || (_POSIX_C_SOURCE > 2)) || defined(__EXTENSIONS__)
+ extern int mlockall(int);
+@@ -302,7 +279,7 @@ struct memcntl_mha32 {
#endif /* !defined(_ASM) */
#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */