From 3e4963370150f0df9c62cd9fe2675336db6ebdf8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 28 Nov 2006 01:13:02 +0000 Subject: delay include elf.h statement until actually needed --- dumpelf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dumpelf.c') diff --git a/dumpelf.c b/dumpelf.c index e84f9ac..54d0755 100644 --- a/dumpelf.c +++ b/dumpelf.c @@ -1,7 +1,7 @@ /* * Copyright 2005-2006 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/dumpelf.c,v 1.17 2006/02/03 00:13:52 solar Exp $ + * $Header: /var/cvsroot/gentoo-projects/pax-utils/dumpelf.c,v 1.18 2006/11/28 01:13:02 vapier Exp $ * * Copyright 2005-2006 Ned Ludd - * Copyright 2005-2006 Mike Frysinger - @@ -9,7 +9,7 @@ #include "paxinc.h" -static const char *rcsid = "$Id: dumpelf.c,v 1.17 2006/02/03 00:13:52 solar Exp $"; +static const char *rcsid = "$Id: dumpelf.c,v 1.18 2006/11/28 01:13:02 vapier Exp $"; #define argv0 "dumpelf" /* prototypes */ @@ -329,8 +329,10 @@ static void parseargs(int argc, char *argv[]) if (optind == argc) err("Nothing to dump !?"); + { long file_cnt = 0; + printf("#include \n"); while (optind < argc) dumpelf(argv[optind++], file_cnt++); } @@ -342,7 +344,6 @@ int main(int argc, char *argv[]) { if (argc < 2) usage(EXIT_FAILURE); - printf("#include \n"); parseargs(argc, argv); return EXIT_SUCCESS; } -- cgit v1.2.3-65-gdbad