Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 260061 Details for
Bug 350677
sys-fs/e2fsprogs-1.41.14 breaks sys-boot/silo (undefined references to posix_memalign)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
posix_memalign.patch (to go into files/)
silo-1.4.14-posix_memalign.patch (text/plain), 1.22 KB, created by
Alex Buell
on 2011-01-17 17:47:42 UTC
(
hide
)
Description:
posix_memalign.patch (to go into files/)
Filename:
MIME Type:
Creator:
Alex Buell
Created:
2011-01-17 17:47:42 UTC
Size:
1.22 KB
patch
obsolete
>diff -uNr silo-1.4.14/second/fs/ext2.c silo/second/fs/ext2.c >--- a/common/malloc.c >+++ b/common/malloc.c >@@ -27,6 +27,12 @@ static char *malloc_ptr = (char *) MALLOC_BASE; > > 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 @@ void *malloc (int size) > 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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 350677
:
259491
|
259694
|
259695
|
260060
| 260061