diff --git a/src/version.c b/src/version.c index 3d948e593f58a5f6df0ccbcfc536c086a6859aa3..8bd94e5651dbc597fcd80bc585a47c6633ee3993 100644 --- a/src/version.c +++ b/src/version.c @@ -21,9 +21,6 @@ /* Config parameters. */ #include "../config.h" -/* Needed for gethostname() */ -#include <unistd.h> - /* MPI headers. */ #ifdef WITH_MPI #include <mpi.h> @@ -50,24 +47,6 @@ /* Local headers. */ #include "version_string.h" -/** - * @brief Return the hostname - * - * Will return the name of the host. - * - * @result the hostname. - */ -const char *hostname(void) { - static char buf[256]; - static int initialised = 0; - if (!initialised) { - buf[255] = '\0'; - if (gethostname(buf, 255)) sprintf(buf, "%s", "Unknown host"); - initialised = 1; - } - return buf; -} - /** * @brief Return the source code git revision * diff --git a/src/version.h b/src/version.h index 07a98c5e3175efd82110efc0104336d657edd469..0d568f312cf775cf932d580a49da7c19c9e14b21 100644 --- a/src/version.h +++ b/src/version.h @@ -22,7 +22,6 @@ const char* package_description(void); const char* package_version(void); -const char* hostname(void); const char* git_revision(void); const char* git_branch(void); const char* compiler_name(void);