aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/utils.h
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-11-13 15:46:27 +0100
committerTobias Brunner <tobias@strongswan.org>2015-11-13 18:24:45 +0100
commitef4279f2e5aa9881855ed608cb81062c3676f077 (patch)
treea26bdefc5ff700204dd7b800a849ef9c02d5716e /src/libstrongswan/utils/utils.h
parent1c1f71343178b35b68265b33093389625a7b2ed6 (diff)
downloadstrongswan-ef4279f2e5aa9881855ed608cb81062c3676f077.tar.bz2
strongswan-ef4279f2e5aa9881855ed608cb81062c3676f077.tar.xz
utils: Provide a fallback for sigwaitinfo() if needed
Apparently, not available on Mac OS X 10.10 Yosemite. We don't provide this on Windows.
Diffstat (limited to 'src/libstrongswan/utils/utils.h')
-rw-r--r--src/libstrongswan/utils/utils.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/utils.h b/src/libstrongswan/utils/utils.h
index 44d882bab..18b17b120 100644
--- a/src/libstrongswan/utils/utils.h
+++ b/src/libstrongswan/utils/utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2014 Tobias Brunner
+ * Copyright (C) 2008-2015 Tobias Brunner
* Copyright (C) 2008 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -38,6 +38,7 @@
# include <netinet/in.h>
# include <sched.h>
# include <poll.h>
+# include <signal.h>
#endif
#include "utils/types.h"
@@ -151,6 +152,19 @@ void utils_deinit();
*/
#define ignore_result(call) { if(call){}; }
+#if !defined(HAVE_SIGWAITINFO) && !defined(WIN32)
+/**
+ * Block and wait for a set of signals
+ *
+ * We don't replicate the functionality of siginfo_t. If info is not NULL
+ * -1 is returend and errno is set to EINVAL.
+ *
+ * @param set set of signals to wait for
+ * @param info must be NULL
+ */
+int sigwaitinfo(const sigset_t *set, void *info);
+#endif
+
/**
* Portable function to wait for SIGINT/SIGTERM (or equivalent).
*/