From ded7c4eb0028518f05bb4ebfa3e617169730d658 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Wed, 21 Oct 2015 16:17:16 +0300 Subject: sys/mman.h expose memcntl() --- uts/debian/changelog | 8 +++++++ uts/debian/patches/series | 2 +- uts/debian/patches/sys_mman.h-bsd_source.patch | 23 ------------------- uts/debian/patches/sys_mman.h.patch | 31 ++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 24 deletions(-) delete mode 100644 uts/debian/patches/sys_mman.h-bsd_source.patch create mode 100644 uts/debian/patches/sys_mman.h.patch diff --git a/uts/debian/changelog b/uts/debian/changelog index 99dc54b..50e4ef1 100644 --- a/uts/debian/changelog +++ b/uts/debian/changelog @@ -1,3 +1,11 @@ +uts (5.10.18.git.2a44663-1) UNRELEASED; urgency=medium + + * sys/mman.h: expose memcntl, renamed: + debian/patches/sys_mman.h-bsd_source.patch -> + debian/patches/sys_mman.h.patch + + -- Igor Pashev Wed, 21 Oct 2015 16:15:41 +0300 + uts (5.10.18.git.2a44663-0.1) unstable; urgency=medium * Here we go! diff --git a/uts/debian/patches/series b/uts/debian/patches/series index 36c661e..a7acf6b 100644 --- a/uts/debian/patches/series +++ b/uts/debian/patches/series @@ -36,7 +36,7 @@ add-loff_t.patch add-MIN-MAX.patch dyson-nobody-uid-is-65534.patch sysmacros-gnu-compat.patch -sys_mman.h-bsd_source.patch +sys_mman.h.patch boolean_t-guard.patch sys_types.h-includes-features.h.patch msghdr-xpg42.patch diff --git a/uts/debian/patches/sys_mman.h-bsd_source.patch b/uts/debian/patches/sys_mman.h-bsd_source.patch deleted file mode 100644 index b69681b..0000000 --- a/uts/debian/patches/sys_mman.h-bsd_source.patch +++ /dev/null @@ -1,23 +0,0 @@ -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 -@@ -238,6 +238,9 @@ extern int munlock(const void *, size_t) - !defined(__PRAGMA_REDEFINE_EXTNAME)) - extern void *mmap64(void *, size_t, int, int, int, off64_t); - #endif /* _LARGEFILE64_SOURCE... */ -+#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 +305,7 @@ struct memcntl_mha32 { - #endif /* !defined(_ASM) */ - #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ - --#if (_POSIX_C_SOURCE <= 2) && !defined(_XPG4_2) || defined(__EXTENSIONS__) -+#if (_POSIX_C_SOURCE <= 2) && !defined(_XPG4_2) || defined(__EXTENSIONS__) || defined(_BSD_SOURCE) - /* - * advice to madvise - * diff --git a/uts/debian/patches/sys_mman.h.patch b/uts/debian/patches/sys_mman.h.patch new file mode 100644 index 0000000..f6e094f --- /dev/null +++ b/uts/debian/patches/sys_mman.h.patch @@ -0,0 +1,31 @@ +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); + extern int mprotect(void *, size_t, int); + extern int msync(void *, size_t, int); + #if (!defined(_XPG4_2) || (_POSIX_C_SOURCE > 2)) || defined(__EXTENSIONS__) ++extern int memcntl(void *, size_t, int, void *, int, int); + extern int mlock(const void *, size_t); + 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) + !defined(__PRAGMA_REDEFINE_EXTNAME)) + extern void *mmap64(void *, size_t, int, int, int, off64_t); + #endif /* _LARGEFILE64_SOURCE... */ ++#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 { + #endif /* !defined(_ASM) */ + #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ + +-#if (_POSIX_C_SOURCE <= 2) && !defined(_XPG4_2) || defined(__EXTENSIONS__) ++#if (_POSIX_C_SOURCE <= 2) && !defined(_XPG4_2) || defined(__EXTENSIONS__) || defined(_BSD_SOURCE) + /* + * advice to madvise + * -- cgit v1.2.3