861ac185a6
```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 ```
27 lines
815 B
Diff
27 lines
815 B
Diff
Portability fixes:
|
|
|
|
- Use fcntl.h for O_RDONLY and friends.
|
|
- Only use mallinfo with glibc.
|
|
|
|
--- a/libdaemon/server/daemon-server.c 2014-11-29 00:07:42.000000000 +0100
|
|
+++ b/libdaemon/server/daemon-server.c 2014-12-28 08:22:40.985928408 +0100
|
|
@@ -14,6 +14,7 @@
|
|
#include "daemon-server.h"
|
|
#include "daemon-log.h"
|
|
|
|
+#include <fcntl.h>
|
|
#include <dlfcn.h>
|
|
#include <errno.h>
|
|
#include <pthread.h>
|
|
|
|
--- a/lib/mm/memlock.c 2016-06-07 08:00:46.557058318 +0200
|
|
+++ b/lib/mm/memlock.c 2016-06-07 08:01:25.453505793 +0200
|
|
@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, siz
|
|
|
|
static void _allocate_memory(void)
|
|
{
|
|
-#ifndef VALGRIND_POOL
|
|
+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
|
|
void *stack_mem;
|
|
struct rlimit limit;
|
|
int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
|