void-packages/srcpkgs/ecryptfs-utils/patches/musl_unistd_h.patch
Đoàn Trần Công Danh a03d116397 srcpkgs/e*: 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

23 lines
674 B
Diff

The types uid_t and gid_t are defined in <unistd.h>, which
isn't included as a side effect with musl libc.
--- a/src/utils/io.c 2015-02-10 17:59:34.000000000 +0100
+++ b/src/utils/io.c 2015-08-07 15:07:56.127793677 +0200
@@ -26,6 +26,7 @@
#include <string.h>
#include <termios.h>
#include <stdlib.h>
+#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
#include "ecryptfs.h"
--- a/src/utils/mount.ecryptfs.c 2015-03-10 17:45:52.000000000 +0100
+++ b/src/utils/mount.ecryptfs.c 2015-08-07 15:15:28.411834229 +0200
@@ -23,6 +23,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
#include <getopt.h>
#include <keyutils.h>
#include <stdio.h>