Browse Source

libkcore Disable checking of /proc files on non-linux systems

Olle E. Johansson 10 years ago
parent
commit
45c3dbee61
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/kcore/statistics.c

+ 6 - 0
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";