This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] GNU/kFreeBSD: No posix_fadvise


Hi,

The attached patch was written by
Petr Salinger <Petr.Salinger@seznam.cz>.  

It seems that GNU/kFreeBSD does not have the posix_fadvise
function.


Kurt

diff --git a/src/strings.c b/src/strings.c
index b69f2ad..cb61508 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -586,9 +586,11 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to)
       elfmap_off = from & ~(ps - 1);
       elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
 
+#ifdef POSIX_FADV_SEQUENTIAL
       if (unlikely (elfmap == MAP_FAILED))
 	/* Let the kernel know we are going to read everything in sequence.  */
 	(void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
+#endif
     }
 
   if (unlikely (elfmap == MAP_FAILED))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]