summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-04 17:20:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:31:10 -0500
commit941544a9514aaae89268bc9d689705ad0724119e (patch)
tree1f75125cb1226f2d3fd0031e5dc1e056c6e896e7 /source3/lib/util.c
parent5a3dcd8dd602dd59f3bfb1c397f80a6be3755df3 (diff)
downloadsamba-941544a9514aaae89268bc9d689705ad0724119e.tar.gz
samba-941544a9514aaae89268bc9d689705ad0724119e.tar.bz2
samba-941544a9514aaae89268bc9d689705ad0724119e.zip
r25505: Add a replacement (IPv4 only) implementation of getaddrinfo/freeaddrinfo
under the 2 clause *BSD license for future use in IPv6 code. Original code was from PostgreSQL and I've maintained their license even though I've rewritten large parts of it (I probably should donate this back to them). Jeremy. (This used to be commit 760d993340a966269d71acfb7a6b5e4d3776ac5d)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 6c86376e57..b98441ea53 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1203,7 +1203,7 @@ void safe_free(void *p)
BOOL get_myname(char *my_name)
{
- pstring hostname;
+ fstring hostname;
*hostname = 0;
@@ -1211,7 +1211,7 @@ BOOL get_myname(char *my_name)
if (gethostname(hostname, sizeof(hostname)) == -1) {
DEBUG(0,("gethostname failed\n"));
return False;
- }
+ }
/* Ensure null termination. */
hostname[sizeof(hostname)-1] = '\0';
@@ -1222,10 +1222,10 @@ BOOL get_myname(char *my_name)
if (p)
*p = 0;
-
+
fstrcpy(my_name,hostname);
}
-
+
return(True);
}