open-src/lib/libdrm/solaris-drm-port.patch
changeset 1265 0b5cc5c013e4
parent 1124 7bc7e624f965
child 1296 9f021f447b92
equal deleted inserted replaced
1264:a3323e4f263f 1265:0b5cc5c013e4
     1 # Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
     1 # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
     2 #
     2 #
     3 # Permission is hereby granted, free of charge, to any person obtaining a
     3 # Permission is hereby granted, free of charge, to any person obtaining a
     4 # copy of this software and associated documentation files (the
     4 # copy of this software and associated documentation files (the
     5 # "Software"), to deal in the Software without restriction, including
     5 # "Software"), to deal in the Software without restriction, including
     6 # without limitation the rights to use, copy, modify, merge, publish,
     6 # without limitation the rights to use, copy, modify, merge, publish,
   194  #include <sys/stat.h>
   194  #include <sys/stat.h>
   195 +#include <sys/sysmacros.h>
   195 +#include <sys/sysmacros.h>
   196  
   196  
   197  #include "internal.h"
   197  #include "internal.h"
   198  
   198  
   199 diff -urp -x '*~' -x '*.orig' xf86drm.c xf86drm.c
       
   200 --- xf86drm.c	2010-06-06 18:11:46.000000000 -0700
       
   201 +++ xf86drm.c	2011-01-24 19:15:45.547448918 -0800
       
   202 @@ -967,7 +967,7 @@ int drmRmMap(int fd, drm_handle_t handle
       
   203  {
       
   204      drm_map_t map;
       
   205  
       
   206 -    map.handle = (void *)handle;
       
   207 +    map.handle = (drm_handle_t)handle;
       
   208  
       
   209      if(drmIoctl(fd, DRM_IOCTL_RM_MAP, &map))
       
   210  	return -errno;
       
   211 diff -urp -x '*~' -x '*.orig' xf86drm.h xf86drm.h
   199 diff -urp -x '*~' -x '*.orig' xf86drm.h xf86drm.h
   212 --- xf86drm.h	2010-06-06 18:11:46.000000000 -0700
   200 --- xf86drm.h	2010-06-06 18:11:46.000000000 -0700
   213 +++ xf86drm.h	2011-01-24 19:15:45.547758484 -0800
   201 +++ xf86drm.h	2011-01-24 19:15:45.547758484 -0800
   214 @@ -451,6 +451,17 @@ do {	register unsigned int __old __asm("
   202 @@ -451,6 +451,17 @@ do {	register unsigned int __old __asm("
   215  #endif /* architecture */
   203  #endif /* architecture */
   241 +/* for now return 0 on solaris */
   229 +/* for now return 0 on solaris */
   242 +	return 0;
   230 +	return 0;
   243  
   231  
   244  }
   232  }
   245 
   233 
       
   234 --- xf86drm.c	Mon Dec  5 12:57:15 2011
       
   235 +++ xf86drm.c	Mon Dec  5 13:03:00 2011
       
   236 @@ -984,7 +984,7 @@
       
   237  {
       
   238      drm_map_t map;
       
   239  
       
   240 -    map.handle = (void *)(uintptr_t)handle;
       
   241 +    map.handle = (drm_handle_t)(uintptr_t)handle;
       
   242  
       
   243      if(drmIoctl(fd, DRM_IOCTL_RM_MAP, &map))
       
   244  	return -errno;