void-packages/srcpkgs/autofs/patches/musl.patch
Đoàn Trần Công Danh ae69000001 srcpkgs/a*: convert patches to -Np1
* arduino and antiword 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-20 13:17:29 +07:00

59 lines
1.7 KiB
Diff

--- a/lib/nss_parse.y 2016-01-10 10:07:26.854512310 +0100
+++ b/lib/nss_parse.y 2016-01-10 10:07:53.134783321 +0100
@@ -28,6 +28,10 @@
#include "nsswitch.h"
#include "nss_parse.tab.h"
+#ifndef _PATH_NSSWITCH_CONF
+#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf"
+#endif
+
static pthread_mutex_t parse_mutex = PTHREAD_MUTEX_INITIALIZER;
static struct list_head *nss_list;
--- a/daemon/automount.c 2016-01-10 10:10:23.680333952 +0100
+++ b/daemon/automount.c 2016-01-10 10:10:35.599456586 +0100
@@ -37,6 +37,14 @@
#include <sys/vfs.h>
#include <sys/utsname.h>
+#ifndef __SWORD_TYPE
+# if __WORDSIZE == 32 /* System word size */
+# define __SWORD_TYPE int
+# else /* __WORDSIZE == 64 */
+# define __SWORD_TYPE long int
+# endif
+#endif
+
#include "automount.h"
#if defined(LIBXML2_WORKAROUND) || defined(TIRPC_WORKAROUND)
#include <dlfcn.h>
--- a/lib/log.c.orig 2019-03-30 10:49:52.965336128 +0100
+++ b/lib/log.c 2019-03-30 10:50:43.232710045 +0100
@@ -38,7 +38,11 @@ static char *prepare_attempt_prefix(cons
char buffer[ATTEMPT_ID_SIZE + 1];
char *prefixed_msg = NULL;
- attempt_id = pthread_getspecific(key_thread_attempt_id);
+ if (key_thread_attempt_id) {
+ attempt_id = pthread_getspecific(key_thread_attempt_id);
+ } else {
+ attempt_id = 0;
+ }
if (attempt_id) {
int len = sizeof(buffer) + 1 + strlen(msg) + 1;
--- a/include/hash.h 2021-01-31 09:22:19.668222263 +0100
+++ b/include/hash.h 2021-01-31 09:22:41.390327622 +0100
@@ -5,6 +5,11 @@
#include <sys/types.h>
#include <stdint.h>
+#include <linux/stddef.h>
+
+#ifndef __GLIBC__
+#include <sys/reg.h>
+#endif
/*
* The "GOLDEN_RATIO_PRIME" is used in ifs/btrfs/brtfs_inode.h and