void-packages/srcpkgs/libcgroup/patches/musl-decls.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

22 lines
535 B
Diff

In musl libc these macros are defined in the deprecated
include file sys/cdefs.h
--- a/include/libcgroup.h 2014-01-13 15:05:56.000000000 +0100
+++ b/include/libcgroup.h 2015-10-25 14:03:32.921207668 +0100
@@ -16,6 +16,16 @@
#ifndef _LIBCGROUP_H
#define _LIBCGROUP_H
+#if !defined(__GLIBC__)
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+#endif /* !defined(__GLIBC__) */
+
#define _LIBCGROUP_H_INSIDE
#include <libcgroup/error.h>