forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
26049111c3
commit
7634d5336a
|
@ -2,7 +2,7 @@
|
|||
#ifndef __LIBPERF_INTERNAL_LIB_H
|
||||
#define __LIBPERF_INTERNAL_LIB_H
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
extern unsigned int page_size;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user