diff --git a/src/plugins/select/bluegene/block_allocator/bridge_linker.c b/src/plugins/select/bluegene/block_allocator/bridge_linker.c
index 66f1a1ee80fce2cb093c8767caee82b365b7e36b..00bf33b89cf73a67060b6326c4c2052899819c62 100644
--- a/src/plugins/select/bluegene/block_allocator/bridge_linker.c
+++ b/src/plugins/select/bluegene/block_allocator/bridge_linker.c
@@ -737,7 +737,7 @@ extern int bridge_set_log_params(char *api_file_name, unsigned int level)
 	/* In the libraries linked to from the bridge there are stderr
 	   messages send which we would miss unless we dup this to the
 	   log */
-	(void)dup2(fp, STDERR_FILENO);
+	(void)dup2(fileno(fp), STDERR_FILENO);
 
 	if(fp2)
 		fclose(fp2);