Skip to content

Commit 120d4f0

Browse files
committed
tools: kdumpid: include config.h before <dis-asm.h>
Before including bfd.h (or any of the headers installed by binutils), one has to define PACKAGE_NAME and PACKAGE_VERSION for kind of painful reasons described in binutils bug PR14243. This doesn't show up on some distros as they patch out the #ifdef check in the headers, but it does on Gentoo where we don't, at least. Moreover, we want to include config.h before *any* headers anyway, so that e.g. AC_SYSTEM_EXTENSIONS and various other autoconf macros work correctly if used. Bug: https://sourceware.org/PR14243 Signed-off-by: Sam James <[email protected]>
1 parent 2cae683 commit 120d4f0

File tree

7 files changed

+14
-0
lines changed

7 files changed

+14
-0
lines changed

tools/kdumpid/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#define _GNU_SOURCE
1616

17+
#include "config.h"
18+
1719
#include <stdio.h>
1820
#include <errno.h>
1921
#include <stdlib.h>

tools/kdumpid/ppc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* GNU General Public License for more details.
1313
*/
1414

15+
#include "config.h"
16+
1517
#include <stdarg.h>
1618
#include <string.h>
1719

tools/kdumpid/ppc64.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* GNU General Public License for more details.
1313
*/
1414

15+
#include "config.h"
16+
1517
#include <stdarg.h>
1618
#include <string.h>
1719

tools/kdumpid/s390.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* GNU General Public License for more details.
1313
*/
1414

15+
#include "config.h"
16+
1517
#include <stdarg.h>
1618
#include <string.h>
1719

tools/kdumpid/search.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* GNU General Public License for more details.
1313
*/
1414

15+
#include "config.h"
16+
1517
#include <stdlib.h>
1618
#include <string.h>
1719

tools/kdumpid/util.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* GNU General Public License for more details.
1313
*/
1414

15+
#include "config.h"
16+
1517
#include <string.h>
1618
#include <stdlib.h>
1719
#include <stdio.h>

tools/kdumpid/x86.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "config.h"
2+
13
#include <stdarg.h>
24
#include <stdlib.h>
35
#include <string.h>

0 commit comments

Comments
 (0)