void-packages/srcpkgs/wvstreams/patches/wvstreams-4.6.1-gcc47.patch
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

50 lines
1.3 KiB
Diff

http://bugs.gentoo.org/419563
http://bugs.gentoo.org/419971
See -gcc47-patch and -magic.patch in Fedora git:
http://pkgs.fedoraproject.org/gitweb/?p=libwvstreams.git;a=tree
--- a/include/wvtask.h
+++ b/include/wvtask.h
@@ -45,7 +45,8 @@
typedef void TaskFunc(void *userdata);
static int taskcount, numtasks, numrunning;
- int magic_number, *stack_magic;
+ int volatile magic_number;
+ int *stack_magic;
WvString name;
int tid;
@@ -84,7 +85,7 @@
static WvTaskMan *singleton;
static int links;
- static int magic_number;
+ static int volatile magic_number;
static WvTaskList all_tasks, free_tasks;
static void get_stack(WvTask &task, size_t size);
--- a/include/wvuid.h
+++ b/include/wvuid.h
@@ -7,6 +7,7 @@
#ifndef __WVUID_H
#define __WVUID_H
+#include <unistd.h>
#include "wvstring.h"
#if WIN32
--- a/utils/wvtask.cc
+++ b/utils/wvtask.cc
@@ -58,7 +58,8 @@
int WvTask::taskcount, WvTask::numtasks, WvTask::numrunning;
WvTaskMan *WvTaskMan::singleton;
-int WvTaskMan::links, WvTaskMan::magic_number;
+int WvTaskMan::links;
+int volatile WvTaskMan::magic_number;
WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks;
ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return,
WvTaskMan::toplevel;