summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-12-09 18:11:14 +0100
committerLudovic Courtès <ludo@gnu.org>2016-12-09 18:11:14 +0100
commitf80b4d2ce09b0b7770cbdf2f90704d41b0a168c5 (patch)
treeec47c7ee5d5579cfa00f13b5038ff3d8c87e4a48 /gnu/packages/patches
parent13b5f44b475aa385d580f7e19b907210bc1d6d99 (diff)
parent2608e40988ba8cf51723fe0d21bdedf6b3997c9c (diff)
downloadguix-f80b4d2ce09b0b7770cbdf2f90704d41b0a168c5.tar.gz
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch11
-rw-r--r--gnu/packages/patches/httpd-CVE-2016-8740.patch36
-rw-r--r--gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch218
-rw-r--r--gnu/packages/patches/readline-7.0-mingw.patch28
-rw-r--r--gnu/packages/patches/seq24-rename-mutex.patch124
-rw-r--r--gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch31
6 files changed, 448 insertions, 0 deletions
diff --git a/gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch b/gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch
new file mode 100644
index 0000000000..0ea008a7cb
--- /dev/null
+++ b/gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch
@@ -0,0 +1,11 @@
+--- a/libgcc/config/i386/gthr-win32.h	2016-03-30 07:45:33.388684463 +0200
++++ b/libgcc/config/i386/gthr-win32.h	2016-03-30 15:51:24.123896436 +0200
+@@ -30,7 +30,7 @@
+
+ /* Make sure CONST_CAST2 (origin in system.h) is declared.  */
+ #ifndef CONST_CAST2
+-#define CONST_CAST2(TOTYPE,FROMTYPE,X) ((__extension__(union {FROMTYPE _q; TOTYPE _nq;})(X))._nq)
++#define CONST_CAST2(TOTYPE,FROMTYPE,X) ((TOTYPE)X)
+ #endif
+
+ /* Windows32 threads specific definitions. The windows32 threading model
diff --git a/gnu/packages/patches/httpd-CVE-2016-8740.patch b/gnu/packages/patches/httpd-CVE-2016-8740.patch
new file mode 100644
index 0000000000..17ba323ccf
--- /dev/null
+++ b/gnu/packages/patches/httpd-CVE-2016-8740.patch
@@ -0,0 +1,36 @@
+This patch applies against httpd-2.4.23 and shouldn't be needed in later releases
+http://openwall.com/lists/oss-security/2016/12/05/17
+Index: modules/http2/h2_stream.c
+===================================================================
+--- modules/http2/h2_stream.c	(revision 1771866)
++++ modules/http2/h2_stream.c	(working copy)
+@@ -322,18 +322,18 @@
+                                            HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE);
+             }
+         }
+-    }
+-    
+-    if (h2_stream_is_scheduled(stream)) {
+-        return h2_request_add_trailer(stream->request, stream->pool,
+-                                      name, nlen, value, vlen);
+-    }
+-    else {
+-        if (!input_open(stream)) {
+-            return APR_ECONNRESET;
++        
++        if (h2_stream_is_scheduled(stream)) {
++            return h2_request_add_trailer(stream->request, stream->pool,
++                                          name, nlen, value, vlen);
+         }
+-        return h2_request_add_header(stream->request, stream->pool,
+-                                     name, nlen, value, vlen);
++        else {
++            if (!input_open(stream)) {
++                return APR_ECONNRESET;
++            }
++            return h2_request_add_header(stream->request, stream->pool,
++                                         name, nlen, value, vlen);
++        }
+     }
+ }
+ 
diff --git a/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch b/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch
new file mode 100644
index 0000000000..e8f841c4fd
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch
@@ -0,0 +1,218 @@
+This patch includes
+
+   * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3
+   * mingw-w64-headers/crt/math.h: Likewise
+   * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add
+   symbols.
+   * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK):
+   Add symbols.
+   (lstat): Add function.
+   * mingw-w64-headers/crt/_mingw_stat64.h: Likewise
+   * mingw-w64-headers/crt/stdlib.h (realpath): Add function.
+
+Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6.
+
+Upstream status: not yet presented upstream.
+
+index 9c5cf87..74a8541 100644
+--- a/mingw-w64-crt/misc/dirname.c
++++ b/mingw-w64-crt/misc/dirname.c
+@@ -29,6 +29,12 @@
+ #define __cdecl  /* this may not be defined.                   */
+ #endif
+ 
++char *__cdecl
++realpath(const char *name, char *resolved)
++{
++  return resolved ? strcpy (resolved, name) : strdup (name);
++}
++
+ char * __cdecl
+ dirname(char *path)
+ {
+diff --git a/mingw-w64-headers/crt/_mingw_stat64.h b/mingw-w64-headers/crt/_mingw_stat64.h
+index 17e754c..7d2339b 100644
+--- a/mingw-w64-headers/crt/_mingw_stat64.h
++++ b/mingw-w64-headers/crt/_mingw_stat64.h
+@@ -2,13 +2,17 @@
+ 
+ #ifdef _USE_32BIT_TIME_T
+ #define _fstat32 _fstat
++#define _lstat32 _lstat
+ #define _stat32 _stat
+ #define _wstat32 _wstat
+ #define _fstat32i64 _fstati64
++#define _lstat32i64 _lstati64
+ #define _stat32i64 _stati64
+ #define _wstat32i64 _wstati64
+ #else
+ #define _fstat _fstat64i32
++#define _lstat _lstat64i32
++#define _lstati64 _lstat64
+ #define _fstati64 _fstat64
+ #define _stat _stat64i32
+ #define _stati64 _stat64
+diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h
+index 5874f4e..bdf4ead 100644
+--- a/mingw-w64-headers/crt/float.h
++++ b/mingw-w64-headers/crt/float.h
+@@ -22,6 +22,15 @@
+ #if (__GNUC__ < 4)
+ #error Corrupt install of gcc-s internal headers, or search order was changed.
+ #else
++
++        /* From gcc-4.9.3 float.h.  */
++        #undef FLT_EPSILON
++        #undef DBL_EPSILON
++        #undef LDBL_EPSILON
++        #define FLT_EPSILON	__FLT_EPSILON__
++        #define DBL_EPSILON	__DBL_EPSILON__
++        #define LDBL_EPSILON	__LDBL_EPSILON__
++
+ 	/* #include_next <float_ginclude.h> */
+ 	
+    	/* Number of decimal digits, q, such that any floating-point number with q
+diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h
+index 1e970f4..99a332f 100644
+--- a/mingw-w64-headers/crt/math.h
++++ b/mingw-w64-headers/crt/math.h
+@@ -216,6 +216,7 @@ extern "C" {
+ #endif
+   }
+ 
++#if 0
+   __CRT_INLINE long double __cdecl fabsl (long double x)
+   {
+ #ifdef __arm__
+@@ -226,6 +227,7 @@ extern "C" {
+     return res;
+ #endif
+   }
++#endif
+ 
+   __CRT_INLINE double __cdecl fabs (double x)
+   {
+@@ -905,7 +907,7 @@ __mingw_choose_expr (                                         \
+ /* 7.12.7.3  */
+   extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
+   extern float __cdecl hypotf (float x, float y);
+-#ifndef __CRT__NO_INLINE
++#if 0 //ndef __CRT__NO_INLINE
+   __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);}
+ #endif
+   extern long double __cdecl hypotl (long double, long double);
+diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h
+index dfc5ae4..6f0fee3 100644
+--- a/mingw-w64-headers/crt/stdlib.h
++++ b/mingw-w64-headers/crt/stdlib.h
+@@ -8,6 +8,7 @@
+ 
+ #include <crtdefs.h>
+ #include <limits.h>
++#include <string.h>
+ 
+ #if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0) && !defined (__USE_MINGW_STRTOX)
+ #define __USE_MINGW_STRTOX 1
+@@ -676,6 +677,8 @@ unsigned long __cdecl _lrotr(unsigned long,int);
+ 
+ #endif /* !__NO_ISOCEXT */
+ 
++char *__cdecl realpath (const char *name, char *resolved);
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/mingw-w64-headers/crt/sys/stat.h b/mingw-w64-headers/crt/sys/stat.h
+index ed60219..d88b4f1 100644
+--- a/mingw-w64-headers/crt/sys/stat.h
++++ b/mingw-w64-headers/crt/sys/stat.h
+@@ -58,16 +58,21 @@ extern "C" {
+ #include <_mingw_stat64.h>
+ 
+ #define _S_IFMT 0xF000
++#define _S_IFLNK 0xA000
++#define _S_IFSOCK 0xC000
+ #define _S_IFDIR 0x4000
+ #define _S_IFCHR 0x2000
+ #define _S_IFIFO 0x1000
+ #define _S_IFREG 0x8000
++#define _S_ISUID 0x0400
++#define _S_ISGID 0x0200
+ #define _S_IREAD 0x0100
+ #define _S_IWRITE 0x0080
+ #define _S_IEXEC 0x0040
+ 
+   _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
+   _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
++  static inline int __cdecl _lstat32(const char *_Name,struct _stat32 *_Stat) {return _stat32(_Name, _Stat);}
+   _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
+   _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
+   int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
+@@ -97,6 +102,9 @@ extern "C" {
+   _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
+   _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
+   int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
++  static inline int __cdecl _lstat64(const char *_Name,struct _stat64 *_Stat) {return _stat64(_Name, _Stat);}
++  static inline int __cdecl _lstat32i64(const char *_Name,struct _stat32i64 *_Stat) {return _stat32i64(_Name, _Stat);}
++  static inline int __cdecl _lstat64i32(const char *_Name,struct _stat64i32 *_Stat) {return _stat64i32(_Name, _Stat);}
+ #ifndef __CRT__NO_INLINE
+   __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
+   {
+@@ -132,6 +140,8 @@ extern "C" {
+ #ifndef	NO_OLDNAMES
+ #define	_S_IFBLK	0x3000	/* Block: Is this ever set under w32? */
+ 
++#define S_IFLNK _S_IFLNK
++#define S_IFSOCK _S_IFSOCK
+ #define S_IFMT _S_IFMT
+ #define S_IFDIR _S_IFDIR
+ #define S_IFCHR _S_IFCHR
+@@ -162,6 +172,11 @@ extern "C" {
+ #define S_IXOTH    (S_IXGRP >> 3)
+ #define S_IRWXO    (S_IRWXG >> 3)
+ 
++#define S_ISUID _S_ISUID
++#define S_ISGID _S_ISGID
++
++#define S_ISLNK(m)	(((m) & S_IFMT) == S_IFLNK)
++#define S_ISSOCK(m)	(((m) & S_IFMT) == S_IFSOCK)
+ #define	S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
+ #define	S_ISFIFO(m)	(((m) & S_IFMT) == S_IFIFO)
+ #define	S_ISCHR(m)	(((m) & S_IFMT) == S_IFCHR)
+@@ -174,6 +189,7 @@ extern "C" {
+ int __cdecl stat(const char *_Filename,struct stat *_Stat);
+ int __cdecl fstat(int _Desc,struct stat *_Stat);
+ int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
++static inline int __cdecl lstat(const char *_Filename,struct stat *_Stat){return stat(_Filename, _Stat);}
+ 
+ #ifndef __CRT__NO_INLINE
+ #ifdef _USE_32BIT_TIME_T
+@@ -262,9 +278,11 @@ __CRT_INLINE int __cdecl
+ 
+ #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
+ #ifdef _USE_32BIT_TIME_T
++#define lstat _lstat32i64
+ #define stat _stat32i64
+ #define fstat _fstat32i64
+ #else
++#define lstat _lstat64
+ #define stat _stat64
+ #define fstat _fstat64
+ #endif
+diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h
+index 52af29b..8626396 100644
+--- a/mingw-w64-headers/include/winnt.h
++++ b/mingw-w64-headers/include/winnt.h
+@@ -6895,7 +6895,12 @@ __buildmemorybarrier()
+ 	  DWORD Reg : 3;
+ 	  DWORD R : 1;
+ 	  DWORD L : 1;
++/* C is used as a const specifier */
++#define save_C C
++#undef C
+ 	  DWORD C : 1;
++#define C save_C
++#undef save_C
+ 	  DWORD StackAdjust : 10;
+ 	} DUMMYSTRUCTNAME;
+       } DUMMYUNIONNAME;
diff --git a/gnu/packages/patches/readline-7.0-mingw.patch b/gnu/packages/patches/readline-7.0-mingw.patch
new file mode 100644
index 0000000000..1dc491d556
--- /dev/null
+++ b/gnu/packages/patches/readline-7.0-mingw.patch
@@ -0,0 +1,28 @@
+Configure checks for chown; add missing shields in code.
+
+Upstream status: not yet presented upstream.
+
+--- readline-7.0/histfile.c.orig	2016-12-06 20:04:10.058901731 +0100
++++ readline-7.0/histfile.c	2016-12-06 20:05:09.220083801 +0100
+@@ -610,8 +610,10 @@
+      user is running this, it's a no-op.  If the shell is running after sudo
+      with a shared history file, we don't want to leave the history file
+      owned by root. */
++#if HAVE_CHOWN
+   if (rv == 0 && exists)
+     r = chown (filename, finfo.st_uid, finfo.st_gid);
++#endif
+ 
+   xfree (filename);
+   FREE (tempname);
+@@ -757,8 +759,10 @@
+      user is running this, it's a no-op.  If the shell is running after sudo
+      with a shared history file, we don't want to leave the history file
+      owned by root. */
++#if HAVE_CHOWN
+   if (rv == 0 && exists)
+     mode = chown (histname, finfo.st_uid, finfo.st_gid);
++#endif
+ 
+   FREE (histname);
+   FREE (tempname);
diff --git a/gnu/packages/patches/seq24-rename-mutex.patch b/gnu/packages/patches/seq24-rename-mutex.patch
new file mode 100644
index 0000000000..ddc5910119
--- /dev/null
+++ b/gnu/packages/patches/seq24-rename-mutex.patch
@@ -0,0 +1,124 @@
+The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
+This patch renames the custom definition.
+
+See https://bugs.launchpad.net/seq24/+bug/1647614 for upstream bug report.
+
+diff --git a/src/midibus.h b/src/midibus.h
+index 2cdf8e8..1bb02bd 100644
+--- a/src/midibus.h
++++ b/src/midibus.h
+@@ -90,7 +90,7 @@ class midibus
+ 
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+@@ -208,7 +208,7 @@ class mastermidibus
+     sequence *m_seq;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+diff --git a/src/midibus_portmidi.h b/src/midibus_portmidi.h
+index 0119e9c..8c6a27a 100644
+--- a/src/midibus_portmidi.h
++++ b/src/midibus_portmidi.h
+@@ -65,7 +65,7 @@ class midibus
+     long m_lasttick;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+@@ -164,7 +164,7 @@ class mastermidibus
+     sequence *m_seq;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* mutex */
+     void lock();
+diff --git a/src/mutex.cpp b/src/mutex.cpp
+index b3f23fd..914114f 100644
+--- a/src/mutex.cpp
++++ b/src/mutex.cpp
+@@ -20,23 +20,23 @@
+ 
+ #include "mutex.h"
+ 
+-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++const pthread_mutex_t seq24mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ const pthread_cond_t condition_var::cond  = PTHREAD_COND_INITIALIZER;
+ 
+-mutex::mutex( )
++seq24mutex::seq24mutex( )
+ {
+     m_mutex_lock = recmutex;
+ }
+ 
+ void
+-mutex::lock( )
++seq24mutex::lock( )
+ {
+     pthread_mutex_lock( &m_mutex_lock );
+ }
+ 
+ 
+ void
+-mutex::unlock( )
++seq24mutex::unlock( )
+ {
+     pthread_mutex_unlock( &m_mutex_lock );
+ }
+diff --git a/src/mutex.h b/src/mutex.h
+index 399f8a3..4f1b867 100644
+--- a/src/mutex.h
++++ b/src/mutex.h
+@@ -24,7 +24,7 @@
+ 
+ #include <pthread.h>
+ 
+-class mutex {
++class seq24mutex {
+ 
+ private:
+ 
+@@ -37,14 +37,14 @@ protected:
+ 
+ public:
+ 
+-    mutex();
++    seq24mutex();
+ 
+     void lock();
+     void unlock();
+ 
+ };
+ 
+-class condition_var : public mutex {
++class condition_var : public seq24mutex {
+ 
+ private:
+ 
+diff --git a/src/sequence.h b/src/sequence.h
+index 2943946..9da8700 100644
+--- a/src/sequence.h
++++ b/src/sequence.h
+@@ -153,7 +153,7 @@ class sequence
+     long m_rec_vol;
+ 
+     /* locking */
+-    mutex m_mutex;
++    seq24mutex m_mutex;
+ 
+     /* used to idenfity which events are ours in the out queue */
+     //unsigned char m_tag;
diff --git a/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch b/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch
new file mode 100644
index 0000000000..48c294f78e
--- /dev/null
+++ b/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch
@@ -0,0 +1,31 @@
+Fix out-of-bounds read in c_substitute():
+
+http://seclists.org/oss-sec/2016/q4/612
+
+Patch copied from upstream source repository:
+
+https://github.com/tcsh-org/tcsh/commit/6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596
+
+From 6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596 Mon Sep 17 00:00:00 2001
+From: christos <christos>
+Date: Fri, 2 Dec 2016 16:59:28 +0000
+Subject: [PATCH] Fix out of bounds read (Brooks Davis) (reproduce by starting
+ tcsh and hitting tab at the prompt)
+
+---
+ ed.chared.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ed.chared.c b/ed.chared.c
+index 1277e53..310393e 100644
+--- ed.chared.c
++++ ed.chared.c
+@@ -750,7 +750,7 @@ c_substitute(void)
+     /*
+      * If we found a history character, go expand it.
+      */
+-    if (HIST != '\0' && *p == HIST)
++    if (p >= InputBuf && HIST != '\0' && *p == HIST)
+ 	nr_exp = c_excl(p);
+     else
+         nr_exp = 0;