Use ui_file_as_string in gdb/compile/
[deliverable/binutils-gdb.git] / gdb / ser-tcp.c
index df3af4c17189b339a6a3395bacee64315fd2c5c9..e689bd7df8acfcf140588f16b6eba006c5669c44 100644 (file)
@@ -54,6 +54,7 @@
 
 #include <signal.h>
 #include "gdb_select.h"
+#include <algorithm>
 
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;
@@ -183,7 +184,7 @@ net_open (struct serial *scb, const char *name)
     error (_("net_open: No colon in host name!"));  /* Shouldn't ever
                                                       happen.  */
 
-  tmp = min (port_str - name, (int) sizeof hostname - 1);
+  tmp = std::min (port_str - name, (ptrdiff_t) sizeof hostname - 1);
   strncpy (hostname, name, tmp);       /* Don't want colon.  */
   hostname[tmp] = '\000';      /* Tie off host name.  */
   port = atoi (port_str + 1);
This page took 0.023616 seconds and 4 git commands to generate.