From owner-svn-ports-head@freebsd.org Fri Jan 13 09:22:26 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3B11CAAE03; Fri, 13 Jan 2017 09:22:26 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FD1A1D50; Fri, 13 Jan 2017 09:22:26 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D9MPSw072237; Fri, 13 Jan 2017 09:22:25 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D9MPIC072235; Fri, 13 Jan 2017 09:22:25 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201701130922.v0D9MPIC072235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Fri, 13 Jan 2017 09:22:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431358 - head/net/multicat/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 09:22:27 -0000 Author: amdmi3 Date: Fri Jan 13 09:22:25 2017 New Revision: 431358 URL: https://svnweb.freebsd.org/changeset/ports/431358 Log: - Try to fix build on DragonFly Added: head/net/multicat/files/ head/net/multicat/files/patch-multicat.c (contents, props changed) head/net/multicat/files/patch-util.c (contents, props changed) head/net/multicat/files/patch-util.h (contents, props changed) Added: head/net/multicat/files/patch-multicat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/multicat/files/patch-multicat.c Fri Jan 13 09:22:25 2017 (r431358) @@ -0,0 +1,28 @@ +--- multicat.c.orig 2016-10-07 14:32:44 UTC ++++ multicat.c +@@ -44,7 +44,7 @@ + #include + #include + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) + # include + #endif + +@@ -280,14 +280,14 @@ static ssize_t raw_Write( const void *p_ + ssize_t i_ret; + struct iovec iov[2]; + +- #if defined(__FreeBSD__) ++ #if defined(__FreeBSD__) || defined(__DragonFly__) + pktheader.udph.uh_ulen + #else + pktheader.udph.len + #endif + = htons(sizeof(struct udphdr) + i_len); + +- #if defined(__FreeBSD__) ++ #if defined(__FreeBSD__) || defined(__DragonFly__) + pktheader.iph.ip_len = htons(sizeof(struct udprawpkt) + i_len); + #endif + Added: head/net/multicat/files/patch-util.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/multicat/files/patch-util.c Fri Jan 13 09:22:25 2017 (r431358) @@ -0,0 +1,56 @@ +--- util.c.orig 2016-10-07 14:32:44 UTC ++++ util.c +@@ -285,7 +285,7 @@ static int GetInterfaceIndex( const char + + close( i_fd ); + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) + return ifr.ifr_index; + #else + return ifr.ifr_ifindex; +@@ -451,7 +451,7 @@ static void RawFillHeaders(struct udpraw + uint8_t ttl, uint8_t tos, uint16_t len) + { + #ifndef __APPLE__ +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) + struct ip *iph = &(dgram->iph); + #else + struct iphdr *iph = &(dgram->iph); +@@ -468,7 +468,7 @@ static void RawFillHeaders(struct udpraw + printf("Filling raw header (%p) (%s:%u -> %s:%u)\n", dgram, ipsrc_str, portsrc, ipdst_str, portdst); + #endif + +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) + // Fill ip header + iph->ip_hl = 5; // ip header with no specific option + iph->ip_v = 4; +@@ -710,7 +710,7 @@ int OpenSocket( const char *_psz_arg, in + i_raw_srcaddr, connect_addr.sin.sin_addr.s_addr, i_raw_srcport, + ntohs(connect_addr.sin.sin_port), i_ttl, i_tos, 0); + i_fd = socket( AF_INET, SOCK_RAW, IPPROTO_RAW ); +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) + if ( setsockopt( i_fd, IPPROTO_IP, IP_HDRINCL, &hincl, sizeof(hincl)) == -1 ) + { + msg_Err( NULL, "unable to set socket (%s)", strerror(errno) ); +@@ -747,7 +747,7 @@ int OpenSocket( const char *_psz_arg, in + + if ( bind_addr.ss.ss_family != AF_UNSPEC ) + { +- #if !defined(__APPLE__) && !defined(__FreeBSD__) ++ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DragonFly__) + if ( IN6_IS_ADDR_MULTICAST( &bind_addr.sin6.sin6_addr ) ) + { + struct ipv6_mreq imr; +@@ -827,7 +827,7 @@ normal_bind: + } + else + #endif +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + if ( i_bind_if_index ) + { + /* Linux-specific interface-bound multicast */ Added: head/net/multicat/files/patch-util.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/multicat/files/patch-util.h Fri Jan 13 09:22:25 2017 (r431358) @@ -0,0 +1,20 @@ +--- util.h.orig 2016-10-07 14:32:44 UTC ++++ util.h +@@ -24,7 +24,7 @@ + #include + #include + +-#if defined(__APPLE__) || defined(__FreeBSD__) ++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) + #define POLLRDHUP 0 + /* uClibc may does not have clock_nanosleep() */ + #elif !defined (__UCLIBC__) || \ +@@ -59,7 +59,7 @@ typedef union + *****************************************************************************/ + struct udprawpkt { + #if !defined(__APPLE__) +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || defined(__DragonFly__) + struct ip iph; + #else + struct iphdr iph;