diff mbox series

[1/3] Add header file lapi/signal.h

Message ID 20190220153412.18090-1-daniel.diaz@linaro.org
State New
Headers show
Series [1/3] Add header file lapi/signal.h | expand

Commit Message

Daniel Díaz Feb. 20, 2019, 3:34 p.m. UTC
Some libc implementations might differ in the definitions they
include. Exempli gratia: MUSL does not define __SIGRTMAX nor
__SIGRTMIN.

This header covers those differences for all tests that
require those definitions.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
 include/lapi/signal.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 include/lapi/signal.h
diff mbox series

Patch

diff --git a/include/lapi/signal.h b/include/lapi/signal.h
new file mode 100644
index 000000000..d22965a94
--- /dev/null
+++ b/include/lapi/signal.h
@@ -0,0 +1,24 @@ 
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 Linaro Limited. All rights reserved.
+ * Author: Daniel Díaz <daniel.diaz@linaro.org>
+ */
+
+#ifndef LAPI_SIGNAL_H
+#define LAPI_SIGNAL_H
+
+#include <signal.h>
+
+/*
+ * Some libc implementations might differ in the definitions they include. This
+ * covers those differences for all tests to successfully build.
+ */
+
+#ifndef __SIGRTMIN
+# define __SIGRTMIN 32
+#endif
+#ifndef __SIGRTMAX
+# define __SIGRTMAX (_NSIG - 1)
+#endif
+
+#endif