#985856 term.c: add "feature_test_macros(7)" definitions for "cfmakeraw()"

Package:
src:nn
Source:
nn
Submitter:
Bjarni Ingi Gislason
Date:
2021-03-24 23:54:06 UTC
Severity:
normal
Tags:
#985856#5
Date:
2021-03-24 23:50:31 UTC
From:
To:
Dear Maintainer,

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

diff --git a/term.c b/term.c
index 2cee711..9e305dd 100644
--- a/term.c
+++ b/term.c
@@ -4,6 +4,17 @@
  *
  *	Terminal interface.
  */
+/* Needed for cfmakeraw() */
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE 1 /* for glibc >= 2.19 */
+#endif
+/* For glibc <= 2.19
+ *
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE 1
+#endif
+ *
+ */
 #define raw __curses__raw__
 #include <stdlib.h>
 #include <unistd.h>