void-packages/srcpkgs/gammu/patches/fix-musl.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

37 lines
1,000 B
Diff

diff --git a/libgammu/device/devfunc.c b/libgammu/device/devfunc.c
index e751cd3..631afb5 100644
--- a/libgammu/device/devfunc.c
+++ b/libgammu/device/devfunc.c
@@ -24,6 +24,7 @@
# include <signal.h>
# include <sys/socket.h>
# include <sys/stat.h>
+# include <sys/select.h>
#endif
#include "devfunc.h"
diff --git a/libgammu/device/proxy/proxy.c b/libgammu/device/proxy/proxy.c
index c68e00e..57f3c4d 100644
--- a/libgammu/device/proxy/proxy.c
+++ b/libgammu/device/proxy/proxy.c
@@ -10,6 +10,7 @@
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/select.h>
#include <unistd.h>
#include "../../gsmcomon.h"
diff --git a/libgammu/device/serial/ser_unx.c b/libgammu/device/serial/ser_unx.c
index c0fbd57..5699238 100644
--- a/libgammu/device/serial/ser_unx.c
+++ b/libgammu/device/serial/ser_unx.c
@@ -28,6 +28,7 @@
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
+#include <sys/select.h>
#ifdef HAVE_I_SETSIG
#include <stropts.h>
#endif