more solaris 10 portability changes ....
[rrdtool.git] / src / rrd_client.c
index 287f642..034beca 100644 (file)
  **/
 
 #include "rrd.h"
-#include "rrd_client.h"
 #include "rrd_tool.h"
+#include "rrd_client.h"
 
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <errno.h>
 #include <assert.h>
 #include <pthread.h>
@@ -33,6 +34,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <netdb.h>
+#include <limits.h>
 
 #ifndef ENODATA
 #define ENODATA ENOENT
@@ -436,8 +438,8 @@ static int rrdc_connect_network (const char *addr_orig) /* {{{ */
       rrd_set_error("garbage after address: %s", port);
       return (-1);
     }
-  } /* if (*addr = ']') */
-  else if (strchr (addr, '.') != NULL) /* Hostname or IPv4 */
+  } /* if (*addr == '[') */
+  else
   {
     port = rindex(addr, ':');
     if (port != NULL)