summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-12-15 18:04:27 +0100
committerLudovic Courtès <ludo@gnu.org>2018-12-16 11:34:14 +0100
commit45e4ace6603e00b297e6542362273041aebe7305 (patch)
tree8bb3a766c97536a66328f9b624072d2f7be503ed /libguile
parent901bfef5922ace25c4344522ce47ed872d37f989 (diff)
Do not warn the user when 'madvise' returns ENOSYS.
* libguile/vm.c (return_unused_stack_to_os): Avoid 'perror' calls when 'madvise' returns ENOSYS.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/vm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/vm.c b/libguile/vm.c
index c8ec6e1b2..c313119e7 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -904,7 +904,10 @@ return_unused_stack_to_os (struct scm_vm *vp)
ret = madvise ((void *) lo, hi - lo, MADV_DONTNEED);
while (ret && errno == EAGAIN);
- if (ret)
+ /* If the OS doesn't implement 'madvise' (as is currently the case
+ for GNU/Hurd), don't warn the user since there's nothing they
+ can do about it. */
+ if (ret && errno != ENOSYS)
perror ("madvise failed");
}