diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-23 18:06:52 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-25 09:51:49 -0300 |
commit | 7634d5336a6e66cba5befd8190b3994916424e08 (patch) | |
tree | 3f06b638fc9266ee21a636722be096ea4a413d04 /tools/perf/util/mmap.c | |
parent | 26049111c333fda4194e895f4cb719766b602256 (diff) |
libperf: Use sys/types.h to get ssize_t, not unistd.h
The sys/types.h header looks more sensible, from its name we can gather
it should be there because of some needed typedef, and it is much
smaller than unistd.h, so use it and fix up the fallout in places where
it was being used for something else entirely but being obtained by
sheer luck, indirectly.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-49bn251httu22ymwgipeavmy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/mmap.c')
-rw-r--r-- | tools/perf/util/mmap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index 12671d0897486..a35dc57d59950 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -12,6 +12,7 @@ #include <linux/zalloc.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> // sysconf() #ifdef HAVE_LIBNUMA_SUPPORT #include <numaif.h> #endif |