post merge fix

main
Alan Hourihane 2003-09-24 14:39:25 +00:00
parent decf9e2297
commit b0a928557c
1 changed files with 9 additions and 3 deletions

View File

@ -94,6 +94,10 @@ extern unsigned long _bus_base(void);
#define DRM_MAJOR 34 #define DRM_MAJOR 34
#endif #endif
# ifdef __OpenBSD__
# define DRM_MAJOR 81
# endif
#ifndef DRM_MAJOR #ifndef DRM_MAJOR
#define DRM_MAJOR 226 /* Linux */ #define DRM_MAJOR 226 /* Linux */
#endif #endif
@ -321,8 +325,10 @@ int drmAvailable(void)
int fd; int fd;
if ((fd = drmOpenMinor(0, 1)) < 0) { if ((fd = drmOpenMinor(0, 1)) < 0) {
#ifdef __linux__
/* Try proc for backward Linux compatibility */ /* Try proc for backward Linux compatibility */
if (!access("/proc/dri/0", R_OK)) return 1; if (!access("/proc/dri/0", R_OK)) return 1;
#endif
return 0; return 0;
} }
@ -598,6 +604,7 @@ drmVersionPtr drmGetVersion(int fd)
version->desc = drmMalloc(version->desc_len + 1); version->desc = drmMalloc(version->desc_len + 1);
if (ioctl(fd, DRM_IOCTL_VERSION, version)) { if (ioctl(fd, DRM_IOCTL_VERSION, version)) {
drmMsg("DRM_IOCTL_VERSION: %s\n", strerror(errno));
drmFreeKernelVersion(version); drmFreeKernelVersion(version);
return NULL; return NULL;
} }
@ -1167,8 +1174,6 @@ int drmGetLock(int fd, drmContext context, drmLockFlags flags)
return 0; return 0;
} }
static void (*drm_unlock_callback)( void ) = 0;
/** /**
* Release the hardware lock. * Release the hardware lock.
* *
@ -1412,7 +1417,8 @@ int drmAgpAlloc(int fd, unsigned long size, unsigned long type,
unsigned long *address, unsigned long *handle) unsigned long *address, unsigned long *handle)
{ {
drm_agp_buffer_t b; drm_agp_buffer_t b;
*handle = 0;
*handle = DRM_AGP_NO_HANDLE;
b.size = size; b.size = size;
b.handle = 0; b.handle = 0;
b.type = type; b.type = type;