diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2003-09-24 14:39:25 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2003-09-24 14:39:25 +0000 |
commit | b0a928557c91fec527f41ae8b2441174889bf32c (patch) | |
tree | 28cb1e418bcc54486fe052e3d17cc9cd0d3f92e3 | |
parent | decf9e2297d87d646a4259f5d70290f105a487cd (diff) |
post merge fix
-rw-r--r-- | libdrm/xf86drm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 6d5f4a6f..773c6d24 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -94,6 +94,10 @@ extern unsigned long _bus_base(void); #define DRM_MAJOR 34 #endif +# ifdef __OpenBSD__ +# define DRM_MAJOR 81 +# endif + #ifndef DRM_MAJOR #define DRM_MAJOR 226 /* Linux */ #endif @@ -321,8 +325,10 @@ int drmAvailable(void) int fd; if ((fd = drmOpenMinor(0, 1)) < 0) { +#ifdef __linux__ /* Try proc for backward Linux compatibility */ if (!access("/proc/dri/0", R_OK)) return 1; +#endif return 0; } @@ -598,6 +604,7 @@ drmVersionPtr drmGetVersion(int fd) version->desc = drmMalloc(version->desc_len + 1); if (ioctl(fd, DRM_IOCTL_VERSION, version)) { + drmMsg("DRM_IOCTL_VERSION: %s\n", strerror(errno)); drmFreeKernelVersion(version); return NULL; } @@ -1167,8 +1174,6 @@ int drmGetLock(int fd, drmContext context, drmLockFlags flags) return 0; } -static void (*drm_unlock_callback)( void ) = 0; - /** * Release the hardware lock. * @@ -1412,7 +1417,8 @@ int drmAgpAlloc(int fd, unsigned long size, unsigned long type, unsigned long *address, unsigned long *handle) { drm_agp_buffer_t b; - *handle = 0; + + *handle = DRM_AGP_NO_HANDLE; b.size = size; b.handle = 0; b.type = type; |