diff --git a/src/slurmd/get_mach_stat.c b/src/slurmd/get_mach_stat.c
index 4b203063007b3efc582f4d2b20e15768a42fb162..c8cb0697b6c47548be628a9b7a5009f0f26b625a 100644
--- a/src/slurmd/get_mach_stat.c
+++ b/src/slurmd/get_mach_stat.c
@@ -22,8 +22,9 @@
 #include <sys/vfs.h>
 #include <unistd.h>
 
-#include <src/slurmd/get_mach_stat.h>
+#include <src/common/hostlist.h>
 #include <src/common/log.h>
+#include <src/slurmd/get_mach_stat.h>
 
 #define MAX_NAME_LEN 1024
 #define TMP_FS "/tmp"
@@ -123,9 +124,9 @@ get_mach_name(char *node_name)
 {
     int error_code;
 
-    error_code = gethostname(node_name, MAX_NAME_LEN);
+    error_code = getnodename(node_name, MAX_NAME_LEN);
     if (error_code != 0)
-	error ("get_mach_name: gethostname error %d\n", error_code);
+	error ("get_mach_name: getnodename error %d\n", error_code);
 
     return error_code;
 }
diff --git a/src/slurmd/slurmd.c b/src/slurmd/slurmd.c
index 3cb15f00686ed8af0a440c482c9b4f91d688276f..2b513284c2945c85fcea130f0ab7b8b8439ae458 100644
--- a/src/slurmd/slurmd.c
+++ b/src/slurmd/slurmd.c
@@ -33,6 +33,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <pthread.h>
+#include <src/common/hostlist.h>
 #include <src/common/xmalloc.h>
 #include <src/common/xstring.h>
 #include <src/common/list.h>
diff --git a/src/slurmd/task_mgr.c b/src/slurmd/task_mgr.c
index c00f22db3dd1eef535a3397e02ccc71676b20b92..78c3cceb72187e6832943cdff7b6c277b0023fad 100644
--- a/src/slurmd/task_mgr.c
+++ b/src/slurmd/task_mgr.c
@@ -178,7 +178,7 @@ int forward_io ( task_start_t * task_arg )
 				task_arg -> launch_msg -> global_task_ids[task_arg -> 
 				local_task_id ] , SLURM_IO_STREAM_INOUT 
 				) ;
-		pack_io_stream_header ( & io_header , & buf_ptr , & size ) ;
+		pack_io_stream_header ( & io_header , (void **) & buf_ptr , & size ) ;
 		slurm_write_stream (  task_arg->sockets[STDIN_OUT_SOCK] , buffer , buf_size - size ) ;
 	}
 	
@@ -200,7 +200,7 @@ int forward_io ( task_start_t * task_arg )
 				task_arg -> launch_msg -> global_task_ids[task_arg -> local_task_id ] , 
 				SLURM_IO_STREAM_SIGERR 
 				) ;
-		pack_io_stream_header ( & io_header , & buf_ptr , & size ) ;
+		pack_io_stream_header ( & io_header , (void **) & buf_ptr , & size ) ;
 		slurm_write_stream (  task_arg->sockets[SIG_STDERR_SOCK] , buffer , buf_size - size ) ;
 	}