void-packages/srcpkgs/libsearpc/patches/01-glib-include-kludge.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

21 lines
582 B
Diff

Recent versions of glib don't work inside an extern "C" block, but some seafile sources
include searpc-client.h inside one. See https://github.com/haiwen/libsearpc/pull/57.
This is the easy fix, needed until upstream fixes the problem.
--- a/lib/searpc-client.h~ 2020-06-18 05:23:11.000000000 +0200
+++ b/lib/searpc-client.h 2021-04-10 15:48:09.994005146 +0200
@@ -7,8 +7,14 @@
#define LIBSEARPC_API
#endif
+#ifdef __cplusplus
+extern "C++" {
+#endif
#include <glib.h>
#include <glib-object.h>
+#ifdef __cplusplus
+}
+#endif
#include <jansson.h>
#ifndef DFT_DOMAIN