diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-06-28 23:20:30 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-06-28 23:20:30 +0000 |
commit | d6a68a48238a2d5cc1af95c93a4822d9a73fb9fd (patch) | |
tree | 7238e0c14a4d568721f87c302c9b006018ddfd5e | |
parent | 8bb36f506fd67911fb8e692b31c1084882b1c462 (diff) |
handle local host lookup failures
-rw-r--r-- | libs/sgi-webuci/boa-patches/110-host_lookup.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/sgi-webuci/boa-patches/110-host_lookup.patch b/libs/sgi-webuci/boa-patches/110-host_lookup.patch new file mode 100644 index 0000000000..89467e419c --- /dev/null +++ b/libs/sgi-webuci/boa-patches/110-host_lookup.patch @@ -0,0 +1,22 @@ +Index: boa-0.94.13/src/config.c +=================================================================== +--- boa-0.94.13.orig/src/config.c 2008-06-29 00:55:19.000000000 +0200 ++++ boa-0.94.13/src/config.c 2008-06-29 00:59:08.000000000 +0200 +@@ -273,12 +273,12 @@ + } + + he = gethostbyname(temp_name); +- if (he == NULL) { +- perror("gethostbyname:"); +- exit(1); +- } ++ if (he && he->h_name) ++ server_name = he->h_name; ++ else ++ server_name = "OpenWrt"; + +- server_name = strdup(he->h_name); ++ server_name = strdup(server_name); + if (server_name == NULL) { + perror("strdup:"); + exit(1); |