1
0
mirror of https://github.com/moparisthebest/socat synced 2024-12-21 22:48:48 -05:00

Red Hat issue: socat 1.7.2.4 build failure missing linux/errqueue.h

This commit is contained in:
Gerhard Rieger 2015-01-23 18:46:04 +01:00
parent 59658d8267
commit f749f5c3e4
4 changed files with 29 additions and 3 deletions

View File

@ -113,6 +113,12 @@ porting:
Lauri Tirkkonen contributed a patch regarding netinet/if_ether.h Lauri Tirkkonen contributed a patch regarding netinet/if_ether.h
on Illumos on Illumos
Red Hat issue 1182005: socat 1.7.2.4 build failure missing
linux/errqueue.h
Socat failed to compile on on PPC due to new requirements for
including <linux/errqueue.h> and a weakness in the conditional code.
Thanks to Michel Normand for reporting this issue.
testing: testing:
Do not distribute testcert.conf with socat source but generate it Do not distribute testcert.conf with socat source but generate it
(and new testcert6.conf) during test.sh run. (and new testcert6.conf) during test.sh run.

View File

@ -317,6 +317,9 @@
/* define if your struct sigaction has sa_sigaction */ /* define if your struct sigaction has sa_sigaction */
#undef HAVE_STRUCT_SIGACTION_SA_SIGACTION #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION
/* define if you have struct sock_extended_err */
#undef HAVE_STRUCT_SOCK_EXTENDED_ERR
/* Define if your struct termios has component c_ispeed */ /* Define if your struct termios has component c_ispeed */
#undef HAVE_TERMIOS_ISPEED #undef HAVE_TERMIOS_ISPEED

View File

@ -81,7 +81,8 @@ AC_HEADER_RESOLV()
AC_CHECK_HEADERS(termios.h linux/if_tun.h) AC_CHECK_HEADERS(termios.h linux/if_tun.h)
AC_CHECK_HEADERS(net/if_dl.h) AC_CHECK_HEADERS(net/if_dl.h)
AC_CHECK_HEADERS(linux/types.h) AC_CHECK_HEADERS(linux/types.h)
AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>]) AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <sys/time.h>
#include <linux/types.h>])
AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h) AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h) AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h)
AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h) AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
@ -936,6 +937,22 @@ if test $sc_cv_type_sa_family_t = yes; then
fi fi
AC_MSG_RESULT($sc_cv_type_sa_family_t) AC_MSG_RESULT($sc_cv_type_sa_family_t)
AC_MSG_CHECKING(for struct sock_extended_err)
AC_CACHE_VAL(sc_cv_struct_sock_extended_err,
[AC_TRY_COMPILE([#include <linux/types.h>
#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#endif
#if HAVE_LINUX_ERRQUEUE_H
#include <linux/errqueue.h>
#endif],[struct sock_extended_err s;],
[sc_cv_struct_sock_extended_err=yes],
[sc_cv_struct_sock_extended_err=no])])
if test $sc_cv_struct_sock_extended_err = yes; then
AC_DEFINE(HAVE_STRUCT_SOCK_EXTENDED_ERR)
fi
AC_MSG_RESULT($sc_cv_struct_sock_extended_err)
AC_MSG_CHECKING(for struct sigaction.sa_sigaction) AC_MSG_CHECKING(for struct sigaction.sa_sigaction)
AC_CACHE_VAL(sc_cv_struct_sigaction_sa_sigaction, AC_CACHE_VAL(sc_cv_struct_sigaction_sa_sigaction,
[AC_TRY_COMPILE([#include <signal.h>],[struct sigaction s;s.sa_sigaction=0;], [AC_TRY_COMPILE([#include <signal.h>],[struct sigaction s;s.sa_sigaction=0;],

View File

@ -506,7 +506,7 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num,
return STAT_OK; return STAT_OK;
#endif /* defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO */ #endif /* defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO */
#endif /* WITH_IP4 */ #endif /* WITH_IP4 */
#ifdef IP_RECVERR #if defined(IP_RECVERR) && HAVE_STRUCT_SOCK_EXTENDED_ERR
case IP_RECVERR: { case IP_RECVERR: {
struct sock_extended_err *err = struct sock_extended_err *err =
(struct sock_extended_err *)CMSG_DATA(cmsg); (struct sock_extended_err *)CMSG_DATA(cmsg);
@ -524,7 +524,7 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num,
err->ee_code, '\0', err->ee_info, '\0', err->ee_data); err->ee_code, '\0', err->ee_info, '\0', err->ee_data);
return STAT_OK; return STAT_OK;
} }
#endif /* IP_RECVERR */ #endif /* defined(IP_RECVERR) && HAVE_STRUCT_SOCK_EXTENDED_ERR */
#ifdef IP_RECVIF #ifdef IP_RECVIF
case IP_RECVIF: { case IP_RECVIF: {
/* spec in FreeBSD: /usr/include/net/if_dl.h */ /* spec in FreeBSD: /usr/include/net/if_dl.h */