From 89b7b67a13ebb7965cc7f13ad0595e2194a2d34c Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 15:48:04 +0200 Subject: add sqmail-4.2.29a --- src/hostname.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/hostname.c (limited to 'src/hostname.c') diff --git a/src/hostname.c b/src/hostname.c new file mode 100644 index 0000000..6a55309 --- /dev/null +++ b/src/hostname.c @@ -0,0 +1,16 @@ +#include +#include "buffer.h" +#include "exit.h" + +char host[256]; + +int main() +{ + host[0] = 0; /* sigh */ + gethostname(host,sizeof(host)); + host[sizeof(host) - 1] = 0; + buffer_puts(buffer_1small,host); + buffer_puts(buffer_1small,"\n"); + buffer_flush(buffer_1small); + _exit(0); +} -- cgit v1.2.3