mirror of
https://github.com/mpv-player/mpv
synced 2024-10-18 10:25:02 +02:00
#ifdef HAVE_SHM
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3009 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b52ed1aee8
commit
69832c15a7
@ -6,6 +6,8 @@
|
|||||||
* Sun Apr 6 02:26:26 MET DST 1997
|
* Sun Apr 6 02:26:26 MET DST 1997
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -22,6 +24,7 @@
|
|||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SHM
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
|
|
||||||
@ -72,7 +75,7 @@ while(1){
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
printf("FATAL: Cannot alloate %d bytes shared memory :(\n",size);
|
printf("FATAL: Cannot allocate %d bytes of shared memory :(\n",size);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
++shmem_type;
|
++shmem_type;
|
||||||
@ -86,3 +89,15 @@ void shmem_free(void* p){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else /* HAVE_SHM */
|
||||||
|
void *shmem_alloc(int size)
|
||||||
|
{
|
||||||
|
printf("FATAL: no SHM support was compiled in!\n");
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void shmem_free(void *p)
|
||||||
|
{
|
||||||
|
printf("FATAL: no SHM support was compiled in!\n");
|
||||||
|
}
|
||||||
|
#endif /* HAVE_SHM */
|
||||||
|
Loading…
Reference in New Issue
Block a user