]> mj.ucw.cz Git - pciutils.git/commitdiff
alloca() needs <alloca.h>.
authorMartin Mares <mj@ucw.cz>
Sun, 4 Feb 2007 21:13:48 +0000 (22:13 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 4 Feb 2007 21:13:48 +0000 (22:13 +0100)
ChangeLog
lspci.c

index c786ebf272db42fea49acb3cb58acb7b91f488a7..3d536baeecd59c220379df92fe5f403b0072abdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-02-04  Martin Mares  <mj@ucw.cz>
+
+       * lspci.c: alloca() needs <alloca.h>.
+
 2006-09-17  Martin Mares  <mj@ucw.cz>
 
        * lib/dump.c: Fixed a couple of bugs in the dump backend which caused
diff --git a/lspci.c b/lspci.c
index 1f3b03715e7be0ffa168935569324e7612669dd7..9c6a0c2f669b73096f5fde4bb947dd6d15ca81e7 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -1,7 +1,7 @@
 /*
  *     The PCI Utilities -- List All PCI Devices
  *
- *     Copyright (c) 1997--2006 Martin Mares <mj@ucw.cz>
+ *     Copyright (c) 1997--2007 Martin Mares <mj@ucw.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
@@ -59,7 +59,9 @@ static struct pci_access *pacc;
  *  use alloca() much.
  */
 
-#ifndef __GNUC__
+#ifdef __GNUC__
+#include <alloca.h>
+#else
 #undef alloca
 #define alloca xmalloc
 #endif