misc/181135: sys/dev/netmap patch for Linux compatibility

Alexander Alexander.Klishin at billing.ru
Thu Aug 8 08:50:01 UTC 2013


>Number:         181135
>Category:       misc
>Synopsis:       sys/dev/netmap patch for Linux compatibility
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 08 08:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Alexander
>Release:        
>Organization:
www.billing.ru
>Environment:
>Description:
Linux contain more precise way to locate lock free version of "ioctl" function.

Current implementation is based on kernel version, and does not detect proper "ioctl" version on old kernels (RedHat 6.3, kernel 2.6.32).

Patch is attached.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- netmap/sys/dev/netmap/netmap.c	2013-08-07 13:17:25.000000000 +0400
+++ netmap.ioctl/sys/dev/netmap/netmap.c	2013-08-08 12:39:05.939206484 +0400
@@ -2027,7 +2027,7 @@
 }
 
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)	// XXX was 38
+#if !defined(HAVE_UNLOCKED_IOCTL)
 #define LIN_IOCTL_NAME	.ioctl
 int
 linux_netmap_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long data /* arg */)


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list