]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/recdb.c
fix another compile warning
[irc/evilnet/x3.git] / src / recdb.c
index 5399622555f7e2881e11e82947a4664a9246a9d4..7565c61400c4e8e9c04216bcf42891529ba8a399 100644 (file)
@@ -3,7 +3,7 @@
  *
  * This file is part of x3.
  *
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
@@ -625,6 +625,7 @@ parse_database(const char *filename)
     /* Try mmap */
     if (!mmap_error && (recdb.s = mmap(NULL, recdb.length, PROT_READ|PROT_WRITE, MAP_PRIVATE, fileno(recdb.f), 0)) != MAP_FAILED) {
         recdb.type = RECDB_MMAP;
+        madvise(recdb.s, recdb.length, MADV_SEQUENTIAL);
     } else {
         /* Fall back to stdio */
         if (!mmap_error) {