diff options
author | pooka <pooka@pkgsrc.org> | 2000-11-23 19:37:13 +0000 |
---|---|---|
committer | pooka <pooka@pkgsrc.org> | 2000-11-23 19:37:13 +0000 |
commit | 3de5c7482d5c5427b8cfe9ce08eb47f210cab0dc (patch) | |
tree | 785ed442c31a9f52836af89830062c6ed09c2368 /audio/madplay/patches | |
parent | 7eee86006ef66ae5cfbdd92495f483c1fd1ba607 (diff) | |
download | pkgsrc-3de5c7482d5c5427b8cfe9ce08eb47f210cab0dc.tar.gz |
Give madvise() to mmap
Diffstat (limited to 'audio/madplay/patches')
-rw-r--r-- | audio/madplay/patches/patch-ad | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/audio/madplay/patches/patch-ad b/audio/madplay/patches/patch-ad new file mode 100644 index 00000000000..5eb08837837 --- /dev/null +++ b/audio/madplay/patches/patch-ad @@ -0,0 +1,24 @@ +$NetBSD: patch-ad,v 1.1 2000/11/23 19:37:14 pooka Exp $ + +--- player.c.orig Thu Nov 16 12:51:04 2000 ++++ player.c Wed Nov 22 13:38:04 2000 +@@ -243,6 +243,9 @@ + input->data = 0; + return MAD_FLOW_BREAK; + } ++#ifdef __NetBSD__ ++ madvise(input->fdm, stat.st_size, MADV_SEQUENTIAL); ++#endif + + input->data = input->fdm; + input->length = stat.st_size; +@@ -709,6 +712,9 @@ + error("decode", ":mmap"); + return -1; + } ++#ifdef __NetBSD__ ++ madvise(player->input.fdm, stat.st_size, MADV_SEQUENTIAL); ++#endif + + player->input.data = player->input.fdm; + player->input.length = stat.st_size; |