#984550 proto.c: add definiton of "_POSIX_C_SOURCE" for "kill(2)"

Package:
src:nn
Source:
nn
Submitter:
Bjarni Ingi Gislason
Date:
2021-03-04 21:15:06 UTC
Severity:
normal
Tags:
#984550#5
Date:
2021-03-04 21:14:15 UTC
From:
To:
Dear Maintainer,

  proto.c:

  The function "kill(2)" needs "_POSIX_C_SOURCE" to be defined to get
its prototype declaration, see "man 2 kill" and
"feature_test_macros(7)."

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 proto.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proto.c b/proto.c
index 1ef23a1..3a9e256 100644
--- a/proto.c
+++ b/proto.c
@@ -5,6 +5,11 @@
  *	Master/slave communication and locking.
  */

+/* Needed for kill(2) */
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 1
+#endif
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <signal.h>