void-packages/srcpkgs/uwsgi/patches/musl-fix-python.patch
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: convert patches to -Np1
```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

13 lines
371 B
Diff

diff --git a/plugins/python/uwsgi_python.h b/plugins/python/uwsgi_python.h
index 0c5c1c8..5c0dc6d 100644
--- a/plugins/python/uwsgi_python.h
+++ b/plugins/python/uwsgi_python.h
@@ -1,4 +1,8 @@
#include <uwsgi.h>
+/* seems like Python.h explicitlyl redefines _GNU_SOURCE */
+#ifdef _GNU_SOURCE
+#undef _GNU_SOURCE
+#endif
#include <Python.h>
#include <frameobject.h>