Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Nov 2013 12:02:02 +0000 (UTC)
From:      Max Khon <fjoe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r334174 - head/misc/dahdi-kmod/files
Message-ID:  <201311181202.rAIC22o9071506@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fjoe
Date: Mon Nov 18 12:02:01 2013
New Revision: 334174
URL: http://svnweb.freebsd.org/changeset/ports/334174

Log:
  Unbreak FreeBSD 10 (no D_PSEUDO) and clang build.

Added:
  head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c   (contents, props changed)
  head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-wctc4xxp-base.c   (contents, props changed)
  head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-wcte12xp-base.c   (contents, props changed)

Added: head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c	Mon Nov 18 12:02:01 2013	(r334174)
@@ -0,0 +1,13 @@
+--- freebsd/drivers/dahdi/dahdi-base.c.orig	2013-10-31 17:36:56.000000000 +0700
++++ freebsd/drivers/dahdi/dahdi-base.c	2013-10-31 17:47:28.000000000 +0700
+@@ -9206,7 +9263,9 @@
+ 	.d_poll		= dahdi_device_poll,
+ 	.d_mmap		= dahdi_device_mmap,
+ 	.d_name		= "dahdi",
+-#if __FreeBSD_version >= 800039
++#if __FreeBSD_version >= 1000000
++	.d_flags	= D_TRACKCLOSE | D_NEEDMINOR,
++#elif __FreeBSD_version >= 800039
+ 	.d_flags	= D_PSEUDO | D_TRACKCLOSE | D_NEEDMINOR
+ #else
+ 	.d_flags	= D_PSEUDO | D_TRACKCLOSE

Added: head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-wctc4xxp-base.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-wctc4xxp-base.c	Mon Nov 18 12:02:01 2013	(r334174)
@@ -0,0 +1,55 @@
+--- freebsd/drivers/dahdi/wctc4xxp/base.c.orig	2013-10-31 18:14:10.000000000 +0700
++++ freebsd/drivers/dahdi/wctc4xxp/base.c	2013-10-31 18:23:01.000000000 +0700
+@@ -2456,9 +2456,9 @@
+ 
+ 	if (unlikely(count > SFRAME_SIZE - sizeof(struct rtp_packet))) {
+ 		DTE_DEBUG(DTE_DEBUG_GENERAL,
+-		   "Cannot transcode packet of %Zu bytes. This exceeds the " \
+-		   "maximum size of %Zu bytes.\n", count,
++		   "Cannot transcode packet of %zu bytes. This exceeds the " \
++		   "maximum size of %zu bytes.\n", count,
+		   SFRAME_SIZE - sizeof(struct rtp_packet));
+ 		return -EINVAL;
+ 	}
+ 
+@@ -2466,8 +2466,8 @@
+ 		if ((G723_5K_BYTES != count) && (G723_6K_BYTES != count)) {
+ 			DTE_DEBUG(DTE_DEBUG_GENERAL,
+ 			   "Trying to transcode packet into G723 format " \
+-			   "that is %Zu bytes instead of the expected " \
++			   "that is %zu bytes instead of the expected " \
+			   "%d/%d bytes.\n", count, G723_5K_BYTES,
+ 			   G723_6K_BYTES);
+ 			return -EINVAL;
+ 		}
+@@ -2496,7 +2496,7 @@
+ 	cpvt->seqno += 1;
+ 
+ 	DTE_DEBUG(DTE_DEBUG_RTP_TX,
+-	    "Sending packet of %Zu byte on channel (%p).\n", count, dtc);
++	    "Sending packet of %zu byte on channel (%p).\n", count, dtc);
+ 
+ 	atomic_inc(&cpvt->stats.packets_sent);
+ 	wctc4xxp_transmit_cmd(wc, cmd);
+@@ -3355,10 +3355,6 @@
+ 		complicated = temp;
+ 	}
+ 
+-	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
+-	   "DTE is using the following channels encoder_channel: " \
+-	   "%d decoder_channel: %d\n", encoder_channel, decoder_channel);
+-
+ 	BUG_ON(encoder_timeslot/2 >= wc->numchannels);
+ 	BUG_ON(decoder_timeslot/2 >= wc->numchannels);
+ 	encoder_pvt = wc->uencode->channels[encoder_timeslot/2].pvt;
+@@ -3377,6 +3373,10 @@
+ 		&decoder_channel))
+ 		goto error_exit;
+ 
++	DTE_DEBUG(DTE_DEBUG_CHANNEL_SETUP,
++	   "DTE is using the following channels encoder_channel: " \
++	   "%d decoder_channel: %d\n", encoder_channel, decoder_channel);
++
+ 	length = (DTE_FORMAT_G729A == complicated) ? G729_LENGTH :
+ 		(DTE_FORMAT_G723_1 == complicated) ? G723_LENGTH : 0;
+ 

Added: head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-wcte12xp-base.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-wcte12xp-base.c	Mon Nov 18 12:02:01 2013	(r334174)
@@ -0,0 +1,14 @@
+--- freebsd/drivers/dahdi/wcte12xp/base.c.orig	2010-09-02 16:16:05.000000000 +0700
++++ freebsd/drivers/dahdi/wcte12xp/base.c	2013-10-31 18:13:29.000000000 +0700
+@@ -1626,7 +1626,11 @@
+ 
+ 	t4_serial_setup(wc);
+ 
++#if defined(__FreeBSD__)
++	num = device_get_unit(pdev->dev) + 1;
++#else
+ 	num = x;
++#endif
+ 	sprintf(wc->span.name, "WCT1/%d", num);
+ 	snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, num);
+ 	wc->span.manufacturer = "Digium";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311181202.rAIC22o9071506>