* ser-mingw.c: Include "command.h".
[binutils-gdb.git] / gdb / ser-mingw.c
index 98b8368e9538f0a9ebcb4e4f05999dd082bd1f9c..99612dfc6f8565fdc1b6d9dea17fae0ee0f5bab2 100644 (file)
@@ -32,6 +32,8 @@
 #include "gdb_assert.h"
 #include "gdb_string.h"
 
+#include "command.h"
+
 void _initialize_ser_windows (void);
 
 struct ser_windows_state
@@ -817,13 +819,18 @@ pipe_windows_open (struct serial *scb, const char *name)
 {
   struct pipe_state *ps;
   FILE *pex_stderr;
+  char **argv;
+  struct cleanup *back_to;
+
+  if (name == NULL)
+    error_no_arg (_("child command"));
+
+  argv = gdb_buildargv (name);
+  back_to = make_cleanup_freeargv (argv);
 
-  char **argv = buildargv (name);
-  struct cleanup *back_to = make_cleanup_freeargv (argv);
   if (! argv[0] || argv[0][0] == '\0')
     error ("missing child command");
 
-
   ps = make_pipe_state ();
   make_cleanup (cleanup_pipe_state, ps);