25 |
|
#include <stdlib.h> |
26 |
|
#include <string.h> |
27 |
|
#include "statgrab.h" |
28 |
< |
#include "time.h" |
28 |
> |
#include <time.h> |
29 |
|
#ifdef SOLARIS |
30 |
|
#include <kstat.h> |
31 |
|
#include <sys/sysinfo.h> |
90 |
|
|
91 |
|
#ifdef LINUX |
92 |
|
FILE *f; |
93 |
< |
/* Horrible big enough, but it should be quite easily */ |
93 |
> |
/* Horrible big enough, but it should be easily big enough */ |
94 |
|
char line[8096]; |
95 |
|
regex_t regex; |
96 |
|
regmatch_t line_match[4]; |
183 |
|
|
184 |
|
interfaces++; |
185 |
|
} |
186 |
+ |
fclose(f); |
187 |
+ |
regfree(®ex); |
188 |
|
|
189 |
|
#endif |
190 |
|
*entries=interfaces; |