diff options
| -rw-r--r-- | linux-core/drm_compat.h | 6 | ||||
| -rw-r--r-- | linux-core/drm_fops.c | 2 | 
2 files changed, 7 insertions, 1 deletions
| diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index bc4d2e58..4ae4ba6d 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -56,6 +56,12 @@  #define module_param(name, type, perm)  #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) +#define current_euid() (current->euid) +#else +#include <linux/cred.h> +#endif +  /* older kernels had different irq args */  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))  #undef DRM_IRQ_ARGS diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c index ec521101..837645ae 100644 --- a/linux-core/drm_fops.c +++ b/linux-core/drm_fops.c @@ -250,7 +250,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,  	memset(priv, 0, sizeof(*priv));  	filp->private_data = priv;  	priv->filp = filp; -	priv->uid = current->euid; +	priv->uid = current_euid();  	priv->pid = current->pid;  	priv->minor = idr_find(&drm_minors_idr, minor_id);  	priv->ioctl_count = 0; | 
