summaryrefslogtreecommitdiffstats
path: root/m4/linux_mremap.m4
blob: 7eb0cce41c47174a5cf7dfb799071b9a7e3d219d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
dnl * Linux compatible mremap()
AC_DEFUN([DOVECOT_LINUX_MREMAP], [
  AC_CACHE_CHECK([Linux compatible mremap()],i_cv_have_linux_mremap,[
    AC_TRY_LINK([
      #include <unistd.h>
      #define __USE_GNU
      #include <sys/mman.h>
    ], [
      mremap(0, 0, 0, MREMAP_MAYMOVE);
    ], [
      i_cv_have_linux_mremap=yes
    ], [
      i_cv_have_linux_mremap=no
    ])
  ])
  if test $i_cv_have_linux_mremap = yes; then
    AC_DEFINE(HAVE_LINUX_MREMAP,, [Define if you have Linux-compatible mremap()])
  fi
])