summaryrefslogtreecommitdiff
path: root/src/libstrongswan
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan')
-rw-r--r--src/libstrongswan/utils/utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/utils.c b/src/libstrongswan/utils/utils.c
index 47d72ee98..40cb43d90 100644
--- a/src/libstrongswan/utils/utils.c
+++ b/src/libstrongswan/utils/utils.c
@@ -124,7 +124,10 @@ void wait_sigint()
sigaddset(&set, SIGTERM);
sigprocmask(SIG_BLOCK, &set, NULL);
- sigwaitinfo(&set, NULL);
+ while (sigwaitinfo(&set, NULL) == -1 && errno == EINTR)
+ {
+ /* wait for signal */
+ }
}
#ifndef HAVE_SIGWAITINFO
@@ -167,7 +170,7 @@ void closefrom(int low_fd)
dir_fd = open("/proc/self/fd", O_RDONLY);
if (dir_fd != -1)
{
- while ((len = syscall(SYS_getdents64, dir_fd, buffer,
+ while ((len = syscall(__NR_getdents64, dir_fd, buffer,
sizeof(buffer))) > 0)
{
for (offset = 0; offset < len; offset += entry->d_reclen)