summaryrefslogtreecommitdiff
path: root/src/backend/port/gethostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/gethostname.c')
-rw-r--r--src/backend/port/gethostname.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/backend/port/gethostname.c b/src/backend/port/gethostname.c
deleted file mode 100644
index 568a2221a9d..00000000000
--- a/src/backend/port/gethostname.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* $Id: gethostname.c,v 1.5 2001/08/24 14:07:49 petere Exp $ */
-
-#include "c.h"
-
-#include <sys/types.h>
-#include <string.h>
-
-#include <sys/utsname.h>
-
-int
-gethostname(char *name, int namelen)
-{
- static struct utsname mname;
- static int called = 0;
-
- if (!called)
- {
- called++;
- uname(&mname);
- }
- strncpy(name, mname.nodename, (SYS_NMLN < namelen ? SYS_NMLN : namelen));
-
- return 0;
-}