2021-06-08 10:41:42 +02:00
|
|
|
Upstream: git diff --no-prefix 4088dc4~ ad8a1e3
|
|
|
|
diff --git src/server/server.c src/server/server.c
|
|
|
|
index a70f6ab..5d7f751 100644
|
srcpkgs/p*: convert patches to -Np1
* par 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-19 05:03:21 +02:00
|
|
|
--- a/src/server/server.c
|
|
|
|
+++ b/src/server/server.c
|
2021-06-08 10:41:42 +02:00
|
|
|
@@ -306,14 +306,20 @@ create_response(const char *nurl, const char *method, unsigned int *rp_code)
|
|
|
|
MHD_RESPMEM_MUST_FREE);
|
|
|
|
}
|
|
|
|
|
|
|
|
-static int cbk_http_request(void *cls,
|
|
|
|
- struct MHD_Connection *connection,
|
|
|
|
- const char *url,
|
|
|
|
- const char *method,
|
|
|
|
- const char *version,
|
|
|
|
- const char *upload_data,
|
|
|
|
- size_t *upload_data_size,
|
|
|
|
- void **ptr)
|
|
|
|
+
|
|
|
|
+#if MHD_VERSION < 0x00097002
|
|
|
|
+static int
|
|
|
|
+#else
|
|
|
|
+static enum MHD_Result
|
|
|
|
+#endif
|
|
|
|
+cbk_http_request(void *cls,
|
|
|
|
+ struct MHD_Connection *connection,
|
|
|
|
+ const char *url,
|
|
|
|
+ const char *method,
|
|
|
|
+ const char *version,
|
|
|
|
+ const char *upload_data,
|
|
|
|
+ size_t *upload_data_size,
|
|
|
|
+ void **ptr)
|
|
|
|
{
|
|
|
|
static int dummy;
|
|
|
|
struct MHD_Response *response;
|