diff --git a/lib/kcore/statistics.c b/lib/kcore/statistics.c index 6c63a4305a2..d18b80467a1 100644 --- a/lib/kcore/statistics.c +++ b/lib/kcore/statistics.c @@ -371,6 +371,12 @@ static int get_used_waiting_queue( int waitingQueueSize = 0; +#ifndef __OS_linux + /* /proc/net/tcp and /proc/net/udp only exists on Linux systems, so don't bother with + trying to open these files */ + return 0; +#endif + /* Set up the file we want to open. */ if (forTCP) { fileToOpen = "/proc/net/tcp";