A few HP-UX fixes
[fio.git] / engines / net.c
index b594e0a50d27561da11b4fe64a3947e142a2ff0c..6866ba2d840465a0dfbeb85372016704c22c5ace 100644 (file)
@@ -280,7 +280,11 @@ static int fio_netio_recv(struct thread_data *td, struct io_u *io_u)
 
        do {
                if (nd->net_protocol == IPPROTO_UDP) {
+#ifdef __hpux
+                       int len = sizeof(nd->addr);
+#else
                        socklen_t len = sizeof(nd->addr);
+#endif
                        struct sockaddr *from = (struct sockaddr *) &nd->addr;
 
                        ret = recvfrom(io_u->file->fd, io_u->xfer_buf,
@@ -377,7 +381,11 @@ static int fio_netio_connect(struct thread_data *td, struct fio_file *f)
 static int fio_netio_accept(struct thread_data *td, struct fio_file *f)
 {
        struct netio_data *nd = td->io_ops->data;
+#ifdef __hpux
+       int socklen = sizeof(nd->addr);
+#else
        socklen_t socklen = sizeof(nd->addr);
+#endif
 
        if (nd->net_protocol == IPPROTO_UDP) {
                f->fd = nd->listenfd;