* [gentoo-commits] gentoo-x86 commit in sys-boot/silo/files: silo-e2fsprogs-1.4.14.patch gcc-4.3-compile.patch silo-1.4.x-noglibc_time.patch sanitized-linuxheaders.patch qa-no-strip.patch
@ 2011-01-22 12:25 Raul Porcel (armin76)
0 siblings, 0 replies; only message in thread
From: Raul Porcel (armin76) @ 2011-01-22 12:25 UTC (permalink / raw
To: gentoo-commits
armin76 11/01/22 12:25:21
Added: silo-e2fsprogs-1.4.14.patch
Removed: gcc-4.3-compile.patch silo-1.4.x-noglibc_time.patch
sanitized-linuxheaders.patch qa-no-strip.patch
Log:
sparc stable, remove old and add patch to fix build with >=e2fsprogs-1.4.14 from upstream, bug #350677
(Portage version: 2.1.9.25/cvs/Linux ia64)
Revision Changes Path
1.1 sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/silo/files/silo-e2fsprogs-1.4.14.patch?rev=1.1&content-type=text/plain
Index: silo-e2fsprogs-1.4.14.patch
===================================================================
# Patch to make silo compile and work with >=e2fsprogs-1.4.14
# http://bugs.gentoo.org/show_bug.cgi?id=350677
# http://marc.info/?l=linux-sparc&m=129468771631829&w=2
--- silo.orig/common/malloc.c 2010-02-28 12:11:51.000000000 +0100
+++ silo/common/malloc.c 2011-01-22 12:06:42.849946213 +0100
@@ -27,6 +27,12 @@
static char *last_alloc = 0;
+static char *align_ptr_to(char *ptr, unsigned long align)
+{
+ return (char *) ((((unsigned long) ptr) + (align - 1UL)) &
+ ~(align - 1UL));
+}
+
void *malloc (int size)
{
char *caddr;
@@ -34,10 +40,34 @@
caddr = malloc_ptr;
malloc_ptr += size;
last_alloc = caddr;
- malloc_ptr = (char *) ((((unsigned long) malloc_ptr) + 7) & (~7));
+ malloc_ptr = align_ptr_to(malloc_ptr, 8UL);
return caddr;
}
+int posix_memalign(void **memptr, unsigned long alignment, unsigned long size)
+{
+ char *caddr;
+
+ if (alignment & (alignment - 1UL))
+ return -1;
+ if (alignment & (sizeof(void *) - 1UL))
+ return -1;
+
+ if (size == 0) {
+ *memptr = (void *) 0;
+ return 0;
+ }
+
+ caddr = align_ptr_to(malloc_ptr, alignment);
+ malloc_ptr = (caddr + size);
+ last_alloc = caddr;
+ malloc_ptr = align_ptr_to(malloc_ptr, 8UL);
+
+ *memptr = caddr;
+
+ return 0;
+}
+
void free (void *m)
{
if (m == last_alloc)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-22 12:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-22 12:25 [gentoo-commits] gentoo-x86 commit in sys-boot/silo/files: silo-e2fsprogs-1.4.14.patch gcc-4.3-compile.patch silo-1.4.x-noglibc_time.patch sanitized-linuxheaders.patch qa-no-strip.patch Raul Porcel (armin76)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox