Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <
1258396365-29217-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
 
        }
 }
 
-int perf_header__read_build_ids(int input, off_t size)
+int perf_header__read_build_ids(int input, off_t offset, off_t size)
 {
        struct build_id_event bev;
        char filename[PATH_MAX];
-       off_t offset = lseek(input, 0, SEEK_CUR);
        off_t limit = offset + size;
        int err = -1;
 
 
                            int full_paths,
                            int *cwdlen,
                            char **cwd);
-int perf_header__read_build_ids(int input, off_t file_size);
+int perf_header__read_build_ids(int input, off_t offset, off_t file_size);
 
 #endif
 
 
                buildid_sec = &feat_sec[idx++];
                lseek(fd, buildid_sec->offset, SEEK_SET);
-               if (perf_header__read_build_ids(fd, buildid_sec->size))
+               if (perf_header__read_build_ids(fd, buildid_sec->offset, buildid_sec->size))
                        pr_debug("failed to read buildids, continuing...\n");
        }