diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c index c8fad1b8..eaf7e084 100644 --- a/src/libsysprof-capture/sysprof-collector.c +++ b/src/libsysprof-capture/sysprof-collector.c @@ -58,6 +58,7 @@ #include #include +#include #include #include #ifdef __linux__ @@ -140,7 +141,7 @@ set_fd_blocking (int fd) { #ifdef F_GETFL long fcntl_flags; - fcntl_flags = fcntl (peer_fd, F_GETFL); + fcntl_flags = fcntl (fd, F_GETFL); if (fcntl_flags == -1) return false; @@ -151,7 +152,7 @@ set_fd_blocking (int fd) fcntl_flags &= ~O_NDELAY; #endif - if (fcntl (peer_fd, F_SETFL, fcntl_flags) == -1) + if (fcntl (fd, F_SETFL, fcntl_flags) == -1) return false; return true;