update Sat Sep 12 12:37:01 PDT 2009
[pkgsrc.git] / wip / electricsheep / patches / patch-aa
1 $NetBSD$
2
3 --- mpeg2dec/libvo/video_out_x11.c.orig Fri Jun  6 02:15:57 2003
4 +++ mpeg2dec/libvo/video_out_x11.c      Sun Jan 25 00:03:30 2004
5 @@ -235,7 +235,9 @@
6      /* this would break the solaris port though :-/ */
7  
8      /* fuck solaris, plug the leak! */
9 +#ifndef __NetBSD__
10      shmctl(instance->shminfo.shmid, IPC_RMID, 0);
11 +#endif
12  
13      /* XShmAttach fails on remote displays, so we have to catch this event */
14  
15 @@ -254,6 +256,9 @@
16         return NULL;
17      }
18  
19 +#ifdef __NetBSD__
20 +    shmctl(instance->shminfo.shmid, IPC_RMID, 0);
21 +#endif
22      return instance->shminfo.shmaddr;
23  }
24  
25 @@ -640,6 +645,9 @@
26      if (instance == NULL)
27         return NULL;
28  
29 +#ifdef __NetBSD__
30 +    memset(instance, 0, sizeof(*instance));
31 +#endif
32      instance->vo.setup = x11_setup;
33      return (vo_instance_t *) instance;
34  }
35 @@ -658,6 +666,9 @@
36      if (instance == NULL)
37         return NULL;
38  
39 +#ifdef __NetBSD__
40 +    memset(instance, 0, sizeof(*instance));
41 +#endif
42      instance->vo.setup = xv_setup;
43      return (vo_instance_t *) instance;
44  }