patch-2.4.0-test9 linux/drivers/char/drm/drm.h

Next file: linux/drivers/char/drm/drmP.h
Previous file: linux/drivers/char/drm/dma.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/char/drm/drm.h linux/drivers/char/drm/drm.h
@@ -35,7 +35,13 @@
 #ifndef _DRM_H_
 #define _DRM_H_
 
+#if defined(__linux__)
 #include <asm/ioctl.h>		/* For _IO* macros */
+#define DRM_IOCTL_NR(n)	     _IOC_NR(n)
+#elif defined(__FreeBSD__)
+#include <sys/ioccom.h>
+#define DRM_IOCTL_NR(n)	     ((n) & 0xff)
+#endif
 
 #define DRM_PROC_DEVICES "/proc/devices"
 #define DRM_PROC_MISC	 "/proc/misc"
@@ -289,7 +295,6 @@
 } drm_agp_info_t;
 
 #define DRM_IOCTL_BASE	     'd'
-#define DRM_IOCTL_NR(n)	     _IOC_NR(n)
 #define DRM_IO(nr)	     _IO(DRM_IOCTL_BASE,nr)
 #define DRM_IOR(nr,size)     _IOR(DRM_IOCTL_BASE,nr,size)
 #define DRM_IOW(nr,size)     _IOW(DRM_IOCTL_BASE,nr,size)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)