#985175 hostname.c: declare "gethostname()"; add prototype for "nn_gethostname()"

Package:
src:nn
Source:
nn
Submitter:
Bjarni Ingi Gislason
Date:
2021-03-14 00:39:04 UTC
Severity:
normal
Tags:
#985175#5
Date:
2021-03-14 00:34:22 UTC
From:
To:
Dear Maintainer,

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

diff --git a/hostname.c b/hostname.c
index edf112f..3a9ad39 100644
--- a/hostname.c
+++ b/hostname.c
@@ -14,6 +14,9 @@
  *	You lose!
  */

+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
 #include <unistd.h>
 #include <string.h>
 #include "config.h"
@@ -24,6 +27,8 @@
 /*
  *	Easy -- we already got it
  */
+void nn_gethostname(char *, int);
+
 void
 nn_gethostname(char *name, int length)
 {