[MPlayer-cvslog] r38662 - trunk/osdep/mmap.h

komh subversion at mplayerhq.hu
Tue Oct 1 11:05:38 EEST 2024


Author: komh
Date: Tue Oct  1 11:05:38 2024
New Revision: 38662

Log:
osdep/mmap.h: define MAP_FAILED if necessary

If sys/mman.h defines MAP_FAILED, config.h will not define MAP_FAILED.
In this case, MAP_FAILED is not defined at all and compilation errors
occur.

Modified:
   trunk/osdep/mmap.h

Modified: trunk/osdep/mmap.h
==============================================================================
--- trunk/osdep/mmap.h	Tue Oct  1 10:59:39 2024	(r38661)
+++ trunk/osdep/mmap.h	Tue Oct  1 11:05:38 2024	(r38662)
@@ -46,7 +46,9 @@
  */
 #define MAP_ANON    0x1000  /* allocated from memory, swap space */
 
-/* MAP_FAILED is defined in config.h */
+#ifndef MAP_FAILED
+#define MAP_FAILED  ((void *) -1)
+#endif
 
 #ifndef _MMAP_DECLARED
 #define _MMAP_DECLARED


More information about the MPlayer-cvslog mailing list