server: fix sk typo and add endian type to probe
[fio.git] / server.c
index 0b1c27f4f69cf56c483e6dfe8fec6772693aa5de..dd0aeb3cb8d320e18a3ac6d3a7e4b1ac24f60796 100644 (file)
--- a/server.c
+++ b/server.c
@@ -324,6 +324,9 @@ static int handle_probe_cmd(struct fio_net_cmd *cmd)
 
        memset(&probe, 0, sizeof(probe));
        gethostname((char *) probe.hostname, sizeof(probe.hostname));
+#ifdef FIO_BIG_ENDIAN
+       probe.bigendian = 1;
+#endif
        probe.fio_major = FIO_MAJOR;
        probe.fio_minor = FIO_MINOR;
        probe.fio_patch = FIO_PATCH;
@@ -645,7 +648,7 @@ static int fio_server(void)
                return -1;
        }
 #ifdef SO_REUSEPORT
-       if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt)) < 0) {
+       if (setsockopt(sk, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt)) < 0) {
                log_err("fio: setsockopt: %s\n", strerror(errno));
                return -1;
        }