void-packages/srcpkgs/PrusaSlicer/patches/0001-Replace-sys-unistd.h-with-unistd.h-for-musl.patch
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

26 lines
651 B
Diff

From 7cdeb3dfbe01fc681c35e89e3f509c8e7ac9522e Mon Sep 17 00:00:00 2001
From: Jasper Chan <jasperchan515@gmail.com>
Date: Mon, 27 May 2019 18:54:59 -0700
Subject: [PATCH] Replace sys/unistd.h with unistd.h for musl
---
src/slic3r/Utils/Serial.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/slic3r/Utils/Serial.cpp src/slic3r/Utils/Serial.cpp
index 601719b50..43dab2390 100644
--- a/src/slic3r/Utils/Serial.cpp
+++ b/src/slic3r/Utils/Serial.cpp
@@ -42,7 +42,7 @@
#ifndef _WIN32
#include <sys/ioctl.h>
#include <sys/time.h>
- #include <sys/unistd.h>
+ #include <unistd.h>
#include <sys/select.h>
#endif
--
2.21.0