diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-06-14 21:29:43 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-06-14 21:29:43 +0300 |
commit | 00d34175c164194076c2bb998e3eea22c7cedeca (patch) | |
tree | 0e0a06c8658396093ddade0ee71669c179bfd8da /libc/debian/patches | |
parent | 50a438f2fc0dc09eb2c7e8c666ed6189cdba5826 (diff) | |
download | illumos-packaging-00d34175c164194076c2bb998e3eea22c7cedeca.tar.gz |
libc: add a bunch of new patches
Diffstat (limited to 'libc/debian/patches')
-rw-r--r-- | libc/debian/patches/libc-mman-protos.patch | 102 | ||||
-rw-r--r-- | libc/debian/patches/libc-stropts.patch | 18 | ||||
-rw-r--r-- | libc/debian/patches/libm-i386-regs.patch | 26 | ||||
-rw-r--r-- | libc/debian/patches/libresolv-getdomainname.patch | 20 | ||||
-rw-r--r-- | libc/debian/patches/no-misleading-indentation.patch | 12 | ||||
-rw-r--r-- | libc/debian/patches/series | 5 |
6 files changed, 183 insertions, 0 deletions
diff --git a/libc/debian/patches/libc-mman-protos.patch b/libc/debian/patches/libc-mman-protos.patch new file mode 100644 index 0000000..3dae529 --- /dev/null +++ b/libc/debian/patches/libc-mman-protos.patch @@ -0,0 +1,102 @@ +Description: fix conflict with sys/mman.h +due to "new-style" prototypes (with void*) +are exposed by default instead of caddr_t +Index: libc/usr/src/lib/libc/port/gen/madvise.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/madvise.c ++++ libc/usr/src/lib/libc/port/gen/madvise.c +@@ -24,9 +24,6 @@ + * Use is subject to license terms. + */ + +-#pragma ident "%Z%%M% %I% %E% SMI" +- +-#include "lint.h" + #include <sys/types.h> + #include <sys/mman.h> + +@@ -35,7 +32,7 @@ + * management of the memory resources of a particular application. + */ + int +-madvise(caddr_t addr, size_t len, int advice) ++madvise(void * addr, size_t len, int advice) + { + return (memcntl(addr, len, MC_ADVISE, (caddr_t)(intptr_t)advice, 0, 0)); + } +Index: libc/usr/src/lib/libc/port/gen/mlock.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/mlock.c ++++ libc/usr/src/lib/libc/port/gen/mlock.c +@@ -27,11 +27,9 @@ + /* Copyright (c) 1988 AT&T */ + /* All Rights Reserved */ + +-#pragma ident "%Z%%M% %I% %E% SMI" + + #pragma weak _mlock = mlock + +-#include "lint.h" + #include <sys/types.h> + #include <sys/mman.h> + +@@ -39,7 +37,7 @@ + * Function to lock address range in memory. + */ + int +-mlock(caddr_t addr, size_t len) ++mlock(const void *addr, size_t len) + { +- return (memcntl(addr, len, MC_LOCK, 0, 0, 0)); ++ return (memcntl((void *)addr, len, MC_LOCK, 0, 0, 0)); + } +Index: libc/usr/src/lib/libc/port/gen/munlock.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/munlock.c ++++ libc/usr/src/lib/libc/port/gen/munlock.c +@@ -27,11 +27,8 @@ + /* Copyright (c) 1988 AT&T */ + /* All Rights Reserved */ + +-#pragma ident "%Z%%M% %I% %E% SMI" +- + #pragma weak _munlock = munlock + +-#include "lint.h" + #include <sys/types.h> + #include <sys/mman.h> + +@@ -40,7 +37,7 @@ + */ + + int +-munlock(caddr_t addr, size_t len) ++munlock(const void *addr, size_t len) + { +- return (memcntl(addr, len, MC_UNLOCK, 0, 0, 0)); ++ return (memcntl((void *)addr, len, MC_UNLOCK, 0, 0, 0)); + } +Index: libc/usr/src/lib/libc/port/threads/scalls.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/threads/scalls.c ++++ libc/usr/src/lib/libc/port/threads/scalls.c +@@ -29,7 +29,6 @@ + + #define __USE_LEGACY_SIGWAIT + +-#include "lint.h" + #include "thr_uberdata.h" + #include <stdarg.h> + #include <poll.h> +@@ -812,9 +811,9 @@ msgsnd(int msqid, const void *msgp, size + } + + int +-msync(caddr_t addr, size_t len, int flags) ++msync(void *addr, size_t len, int flags) + { +- extern int __msync(caddr_t, size_t, int); ++ extern int __msync(void *, size_t, int); + int rv; + + PERFORM(__msync(addr, len, flags)) diff --git a/libc/debian/patches/libc-stropts.patch b/libc/debian/patches/libc-stropts.patch new file mode 100644 index 0000000..7af45eb --- /dev/null +++ b/libc/debian/patches/libc-stropts.patch @@ -0,0 +1,18 @@ +Description: stropts.h redefines a lot of things +which breaks libc build with our new default +options (like _XOPEN_SOURCE=600) +Index: libc/usr/src/lib/libc/port/threads/scalls.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/threads/scalls.c ++++ libc/usr/src/lib/libc/port/threads/scalls.c +@@ -32,9 +32,9 @@ + #include "thr_uberdata.h" + #include <stdarg.h> + #include <poll.h> +-#include <stropts.h> + #include <dlfcn.h> + #include <wait.h> ++#include <sys/stropts.h> + #include <sys/socket.h> + #include <sys/uio.h> + #include <sys/file.h> diff --git a/libc/debian/patches/libm-i386-regs.patch b/libc/debian/patches/libm-i386-regs.patch new file mode 100644 index 0000000..86ac881 --- /dev/null +++ b/libc/debian/patches/libm-i386-regs.patch @@ -0,0 +1,26 @@ +Description: some macros in /usr/include/sys/regset.h +were causing conflicts in a lot of applications. +We have hidden them by the _I386_REGS macros, +and need them anyway for libm +Index: libc/usr/src/lib/libm/Makefile.com +=================================================================== +--- libc.orig/usr/src/lib/libm/Makefile.com ++++ libc/usr/src/lib/libm/Makefile.com +@@ -327,7 +327,7 @@ ROBJS_amd64 = \ + # + # atan2pif.o, sincosf.o, sincospif.o are for internal use only + # +-# LSARC/2003/279 adds the following: ++ LSARC/2003/279 adds the following: + # besself.o 6 + # scalbf.o 1 + # gammaf.o 1 +@@ -514,6 +514,8 @@ LINTFLAGS64 += -errchk=longptr64 + CFLAGS += $(C_BIGPICFLAGS) + CFLAGS64 += $(C_BIGPICFLAGS) + ++CFLAGS += -D_I386_REGS ++ + m9x_IL = $(LIBMDIR)/common/m9x/__fenv_$(TARGET_ARCH).il + + SRCS_LD_i386_amd64 = \ diff --git a/libc/debian/patches/libresolv-getdomainname.patch b/libc/debian/patches/libresolv-getdomainname.patch new file mode 100644 index 0000000..497a928 --- /dev/null +++ b/libc/debian/patches/libresolv-getdomainname.patch @@ -0,0 +1,20 @@ +Description: getdomainname is exposed by our +new default options. This declaration conflicts +the canonical one. +Index: libc/usr/src/lib/libresolv/res_init.c +=================================================================== +--- libc.orig/usr/src/lib/libresolv/res_init.c ++++ libc/usr/src/lib/libresolv/res_init.c +@@ -55,12 +55,6 @@ + #include <netinet/if_ether.h> + #include <arpa/inet.h> + +-/* +- * Undocumented external function in libnsl +- */ +-extern int +-getdomainname(char *, int); +- + #define MAXIFS 256 + + /* diff --git a/libc/debian/patches/no-misleading-indentation.patch b/libc/debian/patches/no-misleading-indentation.patch new file mode 100644 index 0000000..0d285af --- /dev/null +++ b/libc/debian/patches/no-misleading-indentation.patch @@ -0,0 +1,12 @@ +Index: libc/usr/src/Makefile.master +=================================================================== +--- libc.orig/usr/src/Makefile.master ++++ libc/usr/src/Makefile.master +@@ -385,6 +385,7 @@ CERRWARN += -_gcc=-Wno-sign-compare + CERRWARN += -_gcc=-Wno-unknown-pragmas + CERRWARN += -_gcc=-Wno-unused-parameter + CERRWARN += -_gcc=-Wno-missing-field-initializers ++CERRWARN += -_gcc=-Wno-misleading-indentation + + # Unfortunately, this option can misfire very easily and unfixably. + CERRWARN += -_gcc=-Wno-array-bounds diff --git a/libc/debian/patches/series b/libc/debian/patches/series index 82e2ada..26d7058 100644 --- a/libc/debian/patches/series +++ b/libc/debian/patches/series @@ -131,3 +131,8 @@ localeimpl-getenv.patch libm-as.patch libm-fgnu89-inline.patch libc-getopt-const-char.patch +libc-mman-protos.patch +libc-stropts.patch +libm-i386-regs.patch +libresolv-getdomainname.patch +no-misleading-indentation.patch |