1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 04:44:10 +02:00
openwrt-packages/net/dante/patches/100-fix-autoconf-checkerrno.patch
David Yang b75a512915 dante: adopt package
Give this package more love by adopting it :)

Changes since 1.4.1-4:
  * change maintainer to me
  * update to 1.4.3
  + add example config files sockd.conf and socks.conf
  + add service file for sockd
  * update 200-fix-RTLD_NEXT.patch
  - remove merged 210-deactivate-sched_setscheduler.patch
  * fix Autoconf build file

Signed-off-by: David Yang <mmyangfl@gmail.com>
2021-06-24 03:44:23 +08:00

41 lines
1.3 KiB
Diff

--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1106,6 +1106,8 @@ changequote([, ])dnl
dnl test function that tries to determine if a specified errno error exists
m4_define([checkerrno],
[AC_MSG_CHECKING(for errno symbol $3)
+ saved_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -P"
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([[#include <errno.h>]],
[[
@@ -1117,7 +1119,8 @@ errnoval: $3
[AC_MSG_RESULT([OK])
$1="$$1 $3"
cat conftest.i | grep errnoval: >>$2],
- [AC_MSG_RESULT([no])])])
+ [AC_MSG_RESULT([no])])
+ CPPFLAGS="$saved_cppflags"])
AC_DEFUN([L_CHECKERRNO],
[checkerrno($@)])
@@ -1127,6 +1130,8 @@ dnl error exists
dnl test function that tries to determine if a specified errno error exists
m4_define([checkgaierror],
[AC_MSG_CHECKING(for getaddrinfo() error $3)
+ saved_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -P"
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([[
#include <sys/types.h>
@@ -1142,7 +1147,8 @@ gaierrval: $3
$1="$$1 $3"
AC_DEFINE(HAVE_ERR_$3, 1, [$3 gai error found])
cat conftest.i | grep gaierrval: >>$2],
- [AC_MSG_RESULT([no])])])
+ [AC_MSG_RESULT([no])])
+ CPPFLAGS="$saved_cppflags"])
AC_DEFUN([L_CHECKGAIERROR],
[checkgaierror($@)])