* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file lib/hostname.c
+ * @brief Get the local hostname
+ */
#include "common.h"
struct hostent *he;
if(uname(&u) < 0)
- fatal(errno, "error calling uname");
+ disorder_fatal(errno, "error calling uname");
if(!(he = gethostbyname(u.nodename)))
- fatal(0, "cannot resolve '%s'", u.nodename);
+ disorder_fatal(0, "cannot resolve '%s'", u.nodename);
hostname = xstrdup(he->h_name);
}
return hostname;