---
 sys/fs/devfs/devfs_int.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/sys/fs/devfs/devfs_int.h
+++ b/sys/fs/devfs/devfs_int.h
@@ -68,6 +68,9 @@ struct cdev_priv {
 	LIST_HEAD(, cdev_privdata) cdp_fdpriv;
 };
 
+#define member2struct(s, m, x)		\
+	((struct s *)(void *)((char *)(x) - offsetof(struct s, m)))      
+              
 #define	cdev2priv(c)	member2struct(cdev_priv, cdp_c, c)
 
 struct cdev *devfs_alloc(int);
