Include <link.h> only if USE_PT_GNU_EH_FRAME is defined.
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 2010 21:14:41 +0000 (21:14 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 2010 21:14:41 +0000 (21:14 +0000)
2010-09-07  H.J. Lu  <hongjiu.lu@intel.com>

* unwind-dw2-fde-glibc.c: Include <elf.h> for DT_CONFIG.
Include <link.h> only if USE_PT_GNU_EH_FRAME is defined.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163970 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/unwind-dw2-fde-glibc.c

index 6dbb436..9acad65 100644 (file)
@@ -1,5 +1,10 @@
 2010-09-07  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * unwind-dw2-fde-glibc.c: Include <elf.h> for DT_CONFIG.
+       Include <link.h> only if USE_PT_GNU_EH_FRAME is defined.
+
+2010-09-07  H.J. Lu  <hongjiu.lu@intel.com>
+
        * config.gcc: Don't append t-android for Android targets.
 
        * config/t-android: Removed.
index b8a7312..a762d87 100644 (file)
@@ -33,7 +33,7 @@
 #include "tconfig.h"
 #include "tsystem.h"
 #ifndef inhibit_libc
-#include <link.h>
+#include <elf.h>               /* Get DT_CONFIG.  */
 #endif
 #include "coretypes.h"
 #include "tm.h"
@@ -59,6 +59,8 @@
 
 #if defined(USE_PT_GNU_EH_FRAME)
 
+#include <link.h>
+
 #ifndef __RELOC_POINTER
 # define __RELOC_POINTER(ptr, base) ((ptr) + (base))
 #endif