From 52b68ff009a1de30104c9d2e89fd37af038e2ff6 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 25 Jan 2011 20:32:50 -0600 Subject: testing/fts: provide ALIGN() macro --- testing/fts/APKBUILD | 4 ++-- testing/fts/fts-uclibc.patch | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'testing/fts') diff --git a/testing/fts/APKBUILD b/testing/fts/APKBUILD index cbaaf86ef..ef7658293 100644 --- a/testing/fts/APKBUILD +++ b/testing/fts/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: William Pitcock pkgname=fts pkgver=0 -pkgrel=1 +pkgrel=2 pkgdesc="keith bostic's POSIX file tree stream operations library" url="http://bostic.com/" arch="all" @@ -48,5 +48,5 @@ package() { } md5sums="120c14715485ec6ced14f494d059d20a fts.tar.gz -ba391410e4d9b80a374e5974c7ad859f fts-uclibc.patch +588fead4044bf535ff97298651aaab8f fts-uclibc.patch b197744ece4ef9a5fa52692acf9b6666 fts-header-correctness.patch" diff --git a/testing/fts/fts-uclibc.patch b/testing/fts/fts-uclibc.patch index 18b48efb9..359353039 100644 --- a/testing/fts/fts-uclibc.patch +++ b/testing/fts/fts-uclibc.patch @@ -1,15 +1,17 @@ --- fts.orig/fts.c +++ fts/fts.c -@@ -31,6 +31,8 @@ +@@ -31,6 +31,10 @@ * SUCH DAMAGE. */ -+#define ALIGNBYTES (alignof(long double) - 1) -+#define alignof(TYPE) ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) ++#define alignof(TYPE) ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) ++#define ALIGNBYTES (alignof(long double) - 1) ++#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) & ~ALIGNBYTES) ++ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #endif /* LIBC_SCCS and not lint */ -@@ -652,10 +654,10 @@ +@@ -652,10 +656,10 @@ if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) continue; @@ -23,7 +25,7 @@ /* * No more memory for path or structures. Save * errno, free up the current structure and the -@@ -675,7 +677,7 @@ +@@ -675,7 +679,7 @@ maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1; } @@ -32,7 +34,7 @@ p->fts_parent = sp->fts_cur; p->fts_level = level; -@@ -784,7 +786,7 @@ +@@ -784,7 +788,7 @@ /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; -- cgit v1.2.3