summaryrefslogtreecommitdiffstats
path: root/meta/packages/elfutils/elfutils-0.131/prelink_build_fix.patch
blob: 3c3cf79d91782bf68efcd761fc821baae84b84f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
newer prelink building (configure) fails like this
  checking libelf.h usability... no
  checking libelf.h presence... yes
  configure: WARNING: libelf.h: present but cannot be compiled

Found a bug report suggesting fix for the issue here:
  http://bugs.gentoo.org/204502
The bug report says:
------- Comment  #7 From SpanKY  2008-01-06 04:53:16 0000  [reply] -------
do `sed -i 's:off64_t:__off64_t:'` on libelf.h ... that lets me build prelink

2010/06/24
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>

Index: elfutils-0.131/libelf/libelf.h
===================================================================
--- elfutils-0.131.orig/libelf/libelf.h
+++ elfutils-0.131/libelf/libelf.h
@@ -95,7 +95,7 @@ typedef struct
   Elf_Type d_type;		/* Type of this piece of data.  */
   unsigned int d_version;	/* ELF version.  */
   size_t d_size;		/* Size in bytes.  */
-  off64_t d_off;		/* Offset into section.  */
+  __off64_t d_off;		/* Offset into section.  */
   size_t d_align;		/* Alignment in section.  */
 } Elf_Data;
 
@@ -157,7 +157,7 @@ typedef struct
   uid_t ar_uid;			/* User ID.  */
   gid_t ar_gid;			/* Group ID.  */
   mode_t ar_mode;		/* File mode.  */
-  off64_t ar_size;		/* File size.  */
+  __off64_t ar_size;		/* File size.  */
   char *ar_rawname;		/* Original name of archive member.  */
 } Elf_Arhdr;
 
@@ -198,13 +198,13 @@ extern Elf_Cmd elf_next (Elf *__elf);
 extern int elf_end (Elf *__elf);
 
 /* Update ELF descriptor and write file to disk.  */
-extern off64_t elf_update (Elf *__elf, Elf_Cmd __cmd);
+extern __off64_t elf_update (Elf *__elf, Elf_Cmd __cmd);
 
 /* Determine what kind of file is associated with ELF.  */
 extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__));
 
 /* Get the base offset for an object file.  */
-extern off64_t elf_getbase (Elf *__elf);
+extern __off64_t elf_getbase (Elf *__elf);
 
 
 /* Retrieve file identification data.  */
@@ -302,7 +302,7 @@ extern Elf_Data *elf_newdata (Elf_Scn *_
    would be for TYPE.  The resulting Elf_Data pointer is valid until
    elf_end (ELF) is called.  */
 extern Elf_Data *elf_getdata_rawchunk (Elf *__elf,
-				       off64_t __offset, size_t __size,
+				       __off64_t __offset, size_t __size,
 				       Elf_Type __type);
 
 
@@ -314,7 +314,7 @@ extern char *elf_strptr (Elf *__elf, siz
 extern Elf_Arhdr *elf_getarhdr (Elf *__elf);
 
 /* Return offset in archive for current file ELF.  */
-extern off64_t elf_getaroff (Elf *__elf);
+extern __off64_t elf_getaroff (Elf *__elf);
 
 /* Select archive element at OFFSET.  */
 extern size_t elf_rand (Elf *__elf, size_t __offset);