aboutsummaryrefslogtreecommitdiffstats
path: root/misc/dahdi-kmod
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2015-03-22 02:58:30 +0800
committerfjoe <fjoe@FreeBSD.org>2015-03-22 02:58:30 +0800
commite2e5b8b6ef1619c627f78b7418e8f7ddc7101d9e (patch)
tree78140dd838f540968a8fdb798278080cd923db38 /misc/dahdi-kmod
parentbdddb63c6766e434d2b6f69de82fb1439f66bdab (diff)
downloadfreebsd-ports-graphics-e2e5b8b6ef1619c627f78b7418e8f7ddc7101d9e.tar.gz
freebsd-ports-graphics-e2e5b8b6ef1619c627f78b7418e8f7ddc7101d9e.tar.zst
freebsd-ports-graphics-e2e5b8b6ef1619c627f78b7418e8f7ddc7101d9e.zip
Fix build with clang 3.6.
Diffstat (limited to 'misc/dahdi-kmod')
-rw-r--r--misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c30
-rw-r--r--misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi_dynamic_ethmf.c11
-rw-r--r--misc/dahdi-kmod/files/patch-freebsd-include-dahdi-compat-bsd.h13
3 files changed, 49 insertions, 5 deletions
diff --git a/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c b/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c
index 8f41048ee7a..6b928dff60e 100644
--- a/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c
+++ b/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi-base.c
@@ -1,6 +1,30 @@
---- 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 @@
+--- freebsd/drivers/dahdi/dahdi-base.c.orig 2015-03-22 00:41:01.893409000 +0600
++++ freebsd/drivers/dahdi/dahdi-base.c 2015-03-22 00:47:34.870157000 +0600
+@@ -4344,8 +4344,7 @@
+ if (spans[i]->manufacturer)
+ dahdi_copy_string(stack.spaninfo.manufacturer, spans[i]->manufacturer,
+ sizeof(stack.spaninfo.manufacturer));
+- if (spans[i]->devicetype)
+- dahdi_copy_string(stack.spaninfo.devicetype, spans[i]->devicetype, sizeof(stack.spaninfo.devicetype));
++ dahdi_copy_string(stack.spaninfo.devicetype, spans[i]->devicetype, sizeof(stack.spaninfo.devicetype));
+ dahdi_copy_string(stack.spaninfo.location, spans[i]->location, sizeof(stack.spaninfo.location));
+ if (spans[i]->spantype)
+ dahdi_copy_string(stack.spaninfo.spantype, spans[i]->spantype, sizeof(stack.spaninfo.spantype));
+@@ -4406,10 +4405,9 @@
+ dahdi_copy_string(stack.spaninfo_v1.manufacturer,
+ spans[i]->manufacturer,
+ sizeof(stack.spaninfo_v1.manufacturer));
+- if (spans[i]->devicetype)
+- dahdi_copy_string(stack.spaninfo_v1.devicetype,
+- spans[i]->devicetype,
+- sizeof(stack.spaninfo_v1.devicetype));
++ dahdi_copy_string(stack.spaninfo_v1.devicetype,
++ spans[i]->devicetype,
++ sizeof(stack.spaninfo_v1.devicetype));
+ dahdi_copy_string(stack.spaninfo_v1.location,
+ spans[i]->location,
+ sizeof(stack.spaninfo_v1.location));
+@@ -9263,7 +9261,9 @@
.d_poll = dahdi_device_poll,
.d_mmap = dahdi_device_mmap,
.d_name = "dahdi",
diff --git a/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi_dynamic_ethmf.c b/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi_dynamic_ethmf.c
new file mode 100644
index 00000000000..9dac4c1c0a0
--- /dev/null
+++ b/misc/dahdi-kmod/files/patch-freebsd-drivers-dahdi-dahdi_dynamic_ethmf.c
@@ -0,0 +1,11 @@
+--- freebsd/drivers/dahdi/dahdi_dynamic_ethmf.c.orig 2010-09-02 01:11:41.000000000 +0700
++++ freebsd/drivers/dahdi/dahdi_dynamic_ethmf.c 2015-03-22 00:52:55.655191000 +0600
+@@ -689,7 +690,7 @@
+ kfree(z);
+ module_put(THIS_MODULE);
+ } else {
+- if (z && z->span && z->span->name) {
++ if (z && z->span) {
+ printk(KERN_ERR "Cannot find interface for %s\n",
+ z->span->name);
+ }
diff --git a/misc/dahdi-kmod/files/patch-freebsd-include-dahdi-compat-bsd.h b/misc/dahdi-kmod/files/patch-freebsd-include-dahdi-compat-bsd.h
index 0f95e444421..5ab16f64dcb 100644
--- a/misc/dahdi-kmod/files/patch-freebsd-include-dahdi-compat-bsd.h
+++ b/misc/dahdi-kmod/files/patch-freebsd-include-dahdi-compat-bsd.h
@@ -1,5 +1,5 @@
---- freebsd/include/dahdi/compat/bsd.h.orig 2010-10-05 23:41:23.000000000 +0700
-+++ freebsd/include/dahdi/compat/bsd.h 2010-10-05 23:42:01.000000000 +0700
+--- freebsd/include/dahdi/compat/bsd.h.orig 2015-03-22 00:41:01.923397000 +0600
++++ freebsd/include/dahdi/compat/bsd.h 2015-03-22 00:51:34.101470000 +0600
@@ -66,9 +66,11 @@
#define __be32 u_int32_t
@@ -12,3 +12,12 @@
#define __BIG_ENDIAN_BITFIELD
#define __constant_htons(x) (x)
#endif
+@@ -454,7 +456,7 @@
+ #define _module_ptr_args __CONCAT(_module_ptr_args_, __LINE__)
+ #define _module_ptr_init(field, val) \
+ static struct module_ptr_args _module_ptr_args = { \
+- (const void **) &(THIS_MODULE->field), val \
++ (const void **) (uintptr_t) &(THIS_MODULE->field), val \
+ }; \
+ SYSINIT(__CONCAT(_module_ptr_args, _init), \
+ SI_SUB_KLD, SI_ORDER_FIRST, \