void-packages/srcpkgs/expect/patches/0002-cross-WNOHANG-requires-POSIX_SOURCE.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

41 lines
848 B
Diff

From: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
configure.in | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git configure.in configure.in
index ad8db32..6570a07 100755
--- a/configure.in
+++ b/configure.in
@@ -469,21 +469,19 @@ memcpy(s1,s2,0);
# and if so that WNOHANG is not defined. The only place I've
# seen this is ISC.
AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
-AC_TRY_RUN([
+AC_COMPILE_IFELSE([
+AC_LANG_PROGRAM([[
#include <sys/wait.h>
-main() {
-#ifndef WNOHANG
- return 0;
-#else
- return 1;
+]],[[
+#ifdef WNOHANG
+ #error WNOHANG
#endif
-}],
+]])]
+,
AC_MSG_RESULT(yes)
AC_DEFINE(WNOHANG_REQUIRES_POSIX_SOURCE)
,
AC_MSG_RESULT(no)
-,
- AC_MSG_ERROR([Expect can't be cross compiled])
)
AC_MSG_CHECKING([if any value exists for WNOHANG])
--
2.26.0.292.g33ef6b2f38