ports/sysutils/xfsprogs/files/patch-io_mmap.c
Alexey Dokuchaev f9c458ae7c - Update to version 3.2.4, the latest in 3.x branch. Versions 4.x are
available, but they do not configure (this might be a red herring,
  pending further investigation):
    ...
    checking for blkid_probe_get_topology... no

    FATAL ERROR: could not find a valid BLKID header.
    Install the Block device ID development package.

- Because DISTNAME is sane now, setting of EXTRACT_SUFX and WRKSRC are
  no longer needed and were dropped
- DESTDIR is now respected by `install-sh' script, which allows to drop
  patching of individual makefiles and `include/buildmacros' file
- All programs are installed under ${LOCALBASE}/sbin now
- This version requires a number of patches to build on FreeBSD, most
  importantly:

    * Use getmntinfo() and extattr_set_fd() APIs instead of Linuxish
      getmntent() and fsetxattr()
    * Rename LIST_HEAD -> XFS_LIST_HEAD macro to avoid clash with our
      own one provided by queue(3)
    * Disable missing mremap(2) system call support in `io/mmap.c'
    * Replace `dirent->d_off' with more portable call to telldir()
    * Add missing `#include <inttypes.h>' in several files, etc.

TIMESTAMP (xfsprogs-3.2.4.tar.gz) = 1438219249
2017-05-12 19:08:17 +00:00

41 lines
834 B
C

--- io/mmap.c.orig 2015-07-24 04:28:04 UTC
+++ io/mmap.c
@@ -575,6 +575,7 @@ mwrite_f(
return 0;
}
+#ifdef __linux__
static void
mremap_help(void)
{
@@ -634,6 +635,7 @@ mremap_f(
return 0;
}
+#endif
void
mmap_init(void)
@@ -689,6 +691,7 @@ mmap_init(void)
_("writes data into a region in the current memory mapping");
mwrite_cmd.help = mwrite_help;
+#ifdef __linux__
mremap_cmd.name = "mremap";
mremap_cmd.altname = "mrm";
mremap_cmd.cfunc = mremap_f;
@@ -699,11 +702,14 @@ mmap_init(void)
mremap_cmd.oneline =
_("alters the size of the current memory mapping");
mremap_cmd.help = mremap_help;
+#endif
add_command(&mmap_cmd);
add_command(&mread_cmd);
add_command(&msync_cmd);
add_command(&munmap_cmd);
add_command(&mwrite_cmd);
+#ifdef __linux__
add_command(&mremap_cmd);
+#endif
}