packages/net/xtables-addons/patches-1.x/101-rtsp-linux-3.6-compat.patch
juhosg 90f047a93e xtables-addons: build version 2.0 for kernel 3.7 onwards
Version 2.0 of xtables-addons dropped support for all kernels older than
3.7. So we still need to build v1.x for older kernels. Keep a separate
patches directory for it, with almost all the same patches for now.

We can easily drop the 1.x build once we have more than two platforms
running 3.7.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@34921 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-12-29 16:45:40 +00:00

23 lines
520 B
Diff

--- a/extensions/rtsp/nf_conntrack_rtsp.c
+++ b/extensions/rtsp/nf_conntrack_rtsp.c
@@ -28,6 +28,7 @@
* - Port to new NF API
*/
+#include <linux/version.h>
#include <linux/module.h>
#include <linux/netfilter.h>
#include <linux/ip.h>
@@ -496,7 +497,11 @@ init(void)
} else {
sprintf(tmpname, "rtsp-%d", i);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+ strncpy(hlpr->name, tmpname, sizeof(hlpr->name));
+#else
hlpr->name = tmpname;
+#endif
pr_debug("port #%d: %d\n", i, ports[i]);