[dahdi-commits] fjoe: freebsd/trunk r10622 - /freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Apr 3 01:45:12 CDT 2012
Author: fjoe
Date: Tue Apr 3 01:45:08 2012
New Revision: 10622
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10622
Log:
Fix for older sbuf API.
Modified:
freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
Modified: freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c?view=diff&rev=10622&r1=10621&r2=10622
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c (original)
+++ freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c Tue Apr 3 01:45:08 2012
@@ -436,16 +436,23 @@
{
struct sbuf *sb = sbuf_new_auto();
char *res;
+ int len;
sbuf_vprintf(sb, fmt, ap);
+#if __FreeBSD_version >= 802508
if (sbuf_finish(sb)) {
res = NULL;
} else {
- int len = sbuf_len(sb);
+#else
+ sbuf_finish(sb);
+#endif
+ len = sbuf_len(sb);
res = kmalloc(len + 1, gfp);
if (res != NULL)
bcopy(sbuf_data(sb), res, len + 1);
- }
+#if __FreeBSD_version >= 802508
+ }
+#endif
sbuf_delete(sb);
return res;
}
More information about the dahdi-commits
mailing list