projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e459f8
)
don't barf if we can't canonicalize the hostname
author
root
<devnull@localhost>
Sun, 2 Jun 1996 18:05:36 +0000
(18:05 +0000)
committer
root
<devnull@localhost>
Sun, 2 Jun 1996 18:05:36 +0000
(18:05 +0000)
CVS patchset: 599
CVS date: 1996/06/02 18:05:36
build/pack.c
patch
|
blob
|
history
diff --git
a/build/pack.c
b/build/pack.c
index
5e094c1
..
29a4f87
100644
(file)
--- a/
build/pack.c
+++ b/
build/pack.c
@@
-1234,8
+1234,12
@@
static char *buildHost(void)
if (! gotit) {
gethostname(hostname, sizeof(hostname));
- hbn = gethostbyname(hostname);
- strcpy(hostname, hbn->h_name);
+ if ((hbn = gethostbyname(hostname))) {
+ strcpy(hostname, hbn->h_name);
+ } else {
+ message(MESS_WARNING, "Could not canonicalize hostname: %s\n",
+ hostname);
+ }
gotit = 1;
}
return(hostname);