]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/util/symbol-elf.c
perf tools: Add missing headers, mostly stdlib.h
[linux.git] / tools / perf / util / symbol-elf.c
index 4ad106a5f2c06738d3ca27d6aca82641d7e29142..429920978cb0c1fbbdf5c844a00a2bf1bdcf7f54 100644 (file)
@@ -2,6 +2,7 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <errno.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
@@ -14,7 +15,8 @@
 #include "machine.h"
 #include "vdso.h"
 #include "debug.h"
-#include "sane_ctype.h"
+#include "util.h"
+#include <linux/ctype.h>
 #include <symbol/kallsyms.h>
 
 #ifndef EM_AARCH64
@@ -699,7 +701,6 @@ bool __weak elf__needs_adjust_symbols(GElf_Ehdr ehdr)
 int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
                 enum dso_binary_type type)
 {
-       int err = -1;
        GElf_Ehdr ehdr;
        Elf *elf;
        int fd;
@@ -793,7 +794,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
        elf_end(elf);
 out_close:
        close(fd);
-       return err;
+       return -1;
 }
 
 /**