diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-21 21:32:15 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-01-21 21:32:15 +0000 |
commit | 63d8cbd8bc6864db13618f5288204d134b13062d (patch) | |
tree | fd72f3feeb19ed881d696ba6144f4200b2cac2d0 /configure | |
parent | ded52c0bc767b600829232e2c54b5b51af6c5317 (diff) | |
download | mpv-63d8cbd8bc6864db13618f5288204d134b13062d.tar.bz2 mpv-63d8cbd8bc6864db13618f5288204d134b13062d.tar.xz |
better test for MAP_FAILED by Ian Lindsay
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14567 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -2618,6 +2618,19 @@ else fi echores "$_mman" +cat > $TMPC << EOF +#include <sys/types.h> +#include <sys/mman.h> +int main(void) { void *p = MAP_FAILED; return 0; } +EOF +_mman_has_map_failed=no +cc_check && _mman_has_map_failed=yes +if test "$_mman_has_map_failed" = yes ; then + _def_mman_has_map_failed='' +else + _def_mman_has_map_failed='#define MAP_FAILED ((void *) -1)' +fi + echocheck "dynamic loader" cat > $TMPC << EOF #include <dlfcn.h> @@ -6806,11 +6819,6 @@ cat > config.h << EOF /* use GNU internationalization */ $_def_i18n -/* missing mmap function on libc5 systems */ -#ifndef MAP_FAILED -# define MAP_FAILED ((void *) -1) -#endif - /* Runtime CPU detection */ $_def_runtime_cpudetection @@ -6977,6 +6985,7 @@ $_def_alloca /* Define this if your system has the "sys/mman.h" header file */ $_def_mman +$_def_mman_has_map_failed /* Define this if you have the elf dynamic linker -ldl library */ $_def_dl |