Index: branches/2018Q2/net/socat/Makefile =================================================================== --- branches/2018Q2/net/socat/Makefile (revision 469273) +++ branches/2018Q2/net/socat/Makefile (revision 469274) @@ -1,52 +1,52 @@ # Created by: ijliao # $FreeBSD$ PORTNAME= socat PORTVERSION= 1.7.3.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net ipv6 MASTER_SITES= http://www.dest-unreach.org/socat/download/ \ LOCAL/ehaupt MAINTAINER= ehaupt@FreeBSD.org COMMENT= Multipurpose relay and more LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING USES= compiler cpe ssl tar:bzip2 GNU_CONFIGURE= yes USE_RC_SUBR= socat CPE_VENDOR= dest-unreach PORTSCOUT= skipv:2.0.0-b2 PLIST_FILES= bin/filan bin/procan bin/socat man/man1/socat.1.gz PORTDOCS= EXAMPLES README SECURITY FAQ OPTIONS_DEFINE= DOCS READLINE READLINE_CONFIGURE_ENABLE= readline READLINE_USES= readline .include .if ${SSL_DEFAULT} != base CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib .endif .if ${COMPILER_TYPE} == "clang" CFLAGS+= -Wno-unused-comparison .endif do-install: .for f in filan procan socat ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin .endfor ${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include Index: branches/2018Q2/net/socat/files/patch-xioopts.c =================================================================== --- branches/2018Q2/net/socat/files/patch-xioopts.c (nonexistent) +++ branches/2018Q2/net/socat/files/patch-xioopts.c (revision 469274) @@ -0,0 +1,73 @@ +--- xioopts.c.orig 2015-01-24 10:15:22 UTC ++++ xioopts.c +@@ -2971,6 +2971,25 @@ int retropt_bind(struct opt *opts, + OFUNC_TERMIOS_FLAG, OFUNC_TERMIOS_PATTERN, and some OFUNC_SPEC */ + int applyopts(int fd, struct opt *opts, enum e_phase phase) { + struct opt *opt; ++#ifdef HAVE_TERMIOS_ISPEED ++ int ispeed_major = -1, ospeed_major = -1; ++ unsigned int ispeed_value, ospeed_value; ++ bool speed_done = false; ++ ++ opt = opts; while (opt && opt->desc != ODESC_END) { ++ if (opt->desc == ODESC_DONE || ++ (phase != PH_ALL && opt->desc->phase != phase)) { ++ ++opt; continue; } ++ if (opt->desc->optcode == OPT_ISPEED) { ++ ispeed_major = opt->desc->major; ++ ispeed_value = opt->value.u_uint; } ++ if (opt->desc->optcode == OPT_OSPEED) { ++ ospeed_major = opt->desc->major; ++ ospeed_value = opt->value.u_uint; } ++ ++opt; ++ continue; ++ } ++#endif /* HAVE_TERMIOS_ISPEED */ + + opt = opts; while (opt && opt->desc != ODESC_END) { + if (opt->desc == ODESC_DONE || +@@ -3605,21 +3624,29 @@ int applyopts(int fd, struct opt *opts, + + #ifdef HAVE_TERMIOS_ISPEED + } else if (opt->desc->func == OFUNC_TERMIOS_SPEED) { +- union { +- struct termios termarg; +- speed_t speeds[sizeof(struct termios)/sizeof(speed_t)]; +- } tdata; +- if (Tcgetattr(fd, &tdata.termarg) < 0) { +- Error3("tcgetattr(%d, %p): %s", +- fd, &tdata.termarg, strerror(errno)); +- opt->desc = ODESC_ERROR; ++opt; continue; +- } +- tdata.speeds[opt->desc->major] = opt->value.u_uint; +- if (Tcsetattr(fd, TCSADRAIN, &tdata.termarg) < 0) { +- Error3("tcsetattr(%d, TCSADRAIN, %p): %s", +- fd, &tdata.termarg, strerror(errno)); +- opt->desc = ODESC_ERROR; ++opt; continue; +- } ++ if (speed_done == false) { ++ union { ++ struct termios termarg; ++ speed_t speeds[sizeof(struct termios)/sizeof(speed_t)]; ++ } tdata; ++ if (Tcgetattr(fd, &tdata.termarg) < 0) { ++ Error3("tcgetattr(%d, %p): %s", ++ fd, &tdata.termarg, strerror(errno)); ++ opt->desc = ODESC_ERROR; ++opt; continue; ++ } ++ if (ispeed_major < 0 || ospeed_major < 0) ++ tdata.speeds[opt->desc->major] = opt->value.u_uint; ++ else{ ++ tdata.speeds[ispeed_major] = ispeed_value; ++ tdata.speeds[ospeed_major] = ospeed_value; ++ speed_done = true; ++ } ++ if (Tcsetattr(fd, TCSADRAIN, &tdata.termarg) < 0) { ++ Error3("tcsetattr(%d, TCSADRAIN, %p): %s", ++ fd, &tdata.termarg, strerror(errno)); ++ opt->desc = ODESC_ERROR; ++opt; continue; ++ } ++ } + #endif /* HAVE_TERMIOS_ISPEED */ + + } else if (opt->desc->func == OFUNC_TERMIOS_SPEC) { Property changes on: branches/2018Q2/net/socat/files/patch-xioopts.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q2 =================================================================== --- branches/2018Q2 (revision 469273) +++ branches/2018Q2 (revision 469274) Property changes on: branches/2018Q2 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r469273