Merge release-4-6 into master
[alexxy/gromacs.git] / src / gromacs / gmxlib / string2.c
index 405111ee9df4eb2243d9e0cd64c7aa75959d0638..f3d79ada1f3aaf3335da15834161c0d7208cf7fa 100644 (file)
@@ -64,6 +64,7 @@
 #include "smalloc.h"
 #include "gmx_fatal.h"
 #include "macros.h"
+#include "main.h"
 #include "string2.h"
 #include "gromacs/fileio/futil.h"
 
@@ -236,7 +237,7 @@ void nice_header (FILE *out, const char *fn)
 #ifdef HAVE_PWD_H
     uid  = getuid();
     pw   = getpwuid(uid);
-    gh   = gethostname(buf, 255);
+    gh   = gmx_gethostname(buf, 255);
     /* pw returns null on error (e.g. compute nodes lack /etc/passwd) */
     user = pw ? pw->pw_name : unk;
 #else