From 551381b5c59338303281ad62b0da124591019fcd Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 29 Aug 2012 09:31:51 +0000 Subject: main/libc0.9.32: sync sys/quota.h with glibc --- .../0009-sys-quota.h-sync-with-glibc.patch | 163 +++++++++++++++++++++ main/libc0.9.32/APKBUILD | 5 +- 2 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 main/libc0.9.32/0009-sys-quota.h-sync-with-glibc.patch (limited to 'main') diff --git a/main/libc0.9.32/0009-sys-quota.h-sync-with-glibc.patch b/main/libc0.9.32/0009-sys-quota.h-sync-with-glibc.patch new file mode 100644 index 0000000000..528e014038 --- /dev/null +++ b/main/libc0.9.32/0009-sys-quota.h-sync-with-glibc.patch @@ -0,0 +1,163 @@ +From 4bb4a75c61b9746be6746589bc8ac418bf304b47 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Wed, 29 Aug 2012 09:24:25 +0000 +Subject: [PATCH] sys/quota.h: sync with glibc + +This fixes build error when building Firefox 15: +error: 'struct dqblk' has no member named 'dqb_curspace' +--- + include/sys/quota.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 79 insertions(+), 12 deletions(-) + +diff --git a/include/sys/quota.h b/include/sys/quota.h +index a6afdbe..5aa0ec0 100644 +--- a/include/sys/quota.h ++++ b/include/sys/quota.h +@@ -30,8 +30,6 @@ + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. +- * +- * Version: $Id: quota.h,v 1.1 2002/01/03 04:00:09 andersen Exp $ + */ + + #ifndef _SYS_QUOTA_H +@@ -41,6 +39,14 @@ + #include + + /* ++ * Select between different incompatible quota versions. ++ * Default to the version used by Linux kernel version 2.4.22 ++ * or later. */ ++#ifndef _LINUX_QUOTA_VERSION ++# define _LINUX_QUOTA_VERSION 2 ++#endif ++ ++/* + * Convert diskblocks to blocks and the other way around. + * currently only to fool the BSD source. :-) + */ +@@ -94,21 +100,33 @@ + #define SUBCMDSHIFT 8 + #define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK)) + +-#define Q_QUOTAON 0x0100 /* enable quotas */ +-#define Q_QUOTAOFF 0x0200 /* disable quotas */ +-#define Q_GETQUOTA 0x0300 /* get limits and usage */ +-#define Q_SETQUOTA 0x0400 /* set limits and usage */ +-#define Q_SETUSE 0x0500 /* set usage */ +-#define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */ +-#define Q_SETQLIM 0x0700 /* set limits */ +-#define Q_GETSTATS 0x0800 /* get collected stats */ +-#define Q_RSQUASH 0x1000 /* set root_squash option */ ++#if _LINUX_QUOTA_VERSION < 2 ++# define Q_QUOTAON 0x0100 /* enable quotas */ ++# define Q_QUOTAOFF 0x0200 /* disable quotas */ ++# define Q_GETQUOTA 0x0300 /* get limits and usage */ ++# define Q_SETQUOTA 0x0400 /* set limits and usage */ ++# define Q_SETUSE 0x0500 /* set usage */ ++# define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */ ++# define Q_SETQLIM 0x0700 /* set limits */ ++# define Q_GETSTATS 0x0800 /* get collected stats */ ++# define Q_RSQUASH 0x1000 /* set root_squash option */ ++#else ++# define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */ ++# define Q_QUOTAON 0x800002 /* turn quotas on */ ++# define Q_QUOTAOFF 0x800003 /* turn quotas off */ ++# define Q_GETFMT 0x800004 /* get quota format used on given filesystem */ ++# define Q_GETINFO 0x800005 /* get information about quota files */ ++# define Q_SETINFO 0x800006 /* set information about quota files */ ++# define Q_GETQUOTA 0x800007 /* get user quota structure */ ++# define Q_SETQUOTA 0x800008 /* set user quota structure */ ++#endif + + /* + * The following structure defines the format of the disk quota file + * (as it appears on disk) - the file is an array of these structures + * indexed by user or group number. + */ ++#if _LINUX_QUOTA_VERSION < 2 + struct dqblk + { + u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ +@@ -120,13 +138,45 @@ struct dqblk + time_t dqb_btime; /* time limit for excessive disk use */ + time_t dqb_itime; /* time limit for excessive files */ + }; ++#else ++ ++/* Flags that indicate which fields in dqblk structure are valid. */ ++#define QIF_BLIMITS 1 ++#define QIF_SPACE 2 ++#define QIF_ILIMITS 4 ++#define QIF_INODES 8 ++#define QIF_BTIME 16 ++#define QIF_ITIME 32 ++#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS) ++#define QIF_USAGE (QIF_SPACE | QIF_INODES) ++#define QIF_TIMES (QIF_BTIME | QIF_ITIME) ++#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES) ++ ++struct dqblk ++ { ++ u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ ++ u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */ ++ u_int64_t dqb_curspace; /* current quota block count */ ++ u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */ ++ u_int64_t dqb_isoftlimit; /* preferred inode limit */ ++ u_int64_t dqb_curinodes; /* current # allocated inodes */ ++ u_int64_t dqb_btime; /* time limit for excessive disk use */ ++ u_int64_t dqb_itime; /* time limit for excessive files */ ++ u_int32_t dqb_valid; /* bitmask of QIF_* constants */ ++ }; ++#endif + + /* + * Shorthand notation. + */ + #define dq_bhardlimit dq_dqb.dqb_bhardlimit + #define dq_bsoftlimit dq_dqb.dqb_bsoftlimit +-#define dq_curblocks dq_dqb.dqb_curblocks ++#if _LINUX_QUOTA_VERSION < 2 ++# define dq_curblocks dq_dqb.dqb_curblocks ++#else ++# define dq_curspace dq_dqb.dqb_curspace ++# define dq_valid dq_dqb.dqb_valid ++#endif + #define dq_ihardlimit dq_dqb.dqb_ihardlimit + #define dq_isoftlimit dq_dqb.dqb_isoftlimit + #define dq_curinodes dq_dqb.dqb_curinodes +@@ -135,6 +185,7 @@ struct dqblk + + #define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk))) + ++#if _LINUX_QUOTA_VERSION < 2 + struct dqstats + { + u_int32_t lookups; +@@ -147,6 +198,22 @@ struct dqstats + u_int32_t free_dquots; + u_int32_t syncs; + }; ++#else ++ ++/* Flags that indicate which fields in dqinfo structure are valid. */ ++# define IIF_BGRACE 1 ++# define IIF_IGRACE 2 ++# define IIF_FLAGS 4 ++# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS) ++ ++struct dqinfo ++ { ++ u_int64_t dqi_bgrace; ++ u_int64_t dqi_igrace; ++ u_int32_t dqi_flags; ++ u_int32_t dqi_valid; ++ }; ++#endif + + __BEGIN_DECLS + +-- +1.7.12 + diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD index aa6dbebbfe..072a791480 100644 --- a/main/libc0.9.32/APKBUILD +++ b/main/libc0.9.32/APKBUILD @@ -4,7 +4,7 @@ pkgname=libc$_abiver _gitver= pkgver=0.9.33.2 _ver=${pkgver/_/-} -pkgrel=7 +pkgrel=8 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" @@ -46,6 +46,8 @@ uClibc-0.9.33-avahi.patch 0005-pread_write.c-make-all-archs-use-common-code.patch 0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch + 0009-sys-quota.h-sync-with-glibc.patch + uclibcconfig.x86 uclibcconfig.x86_64 uclibcconfig.i486 @@ -158,6 +160,7 @@ f059f5e437ed4fe1b6973dd08972e583 0003-pread-pwrite-drop-fallback-funcs.patch 1983ddd723a96432aba74b1132bd6e29 0004-add-cancellation-to-generic-pread_write.patch 32544dc16cc1b4845484535bf758a4b1 0005-pread_write.c-make-all-archs-use-common-code.patch 73037bc978897e20ae2fc531759443eb 0006-endian.h-add-some-handy-macros-to-be-used-in-syscall.patch +f41ab6cf22545d2e629d4c7107ac6f85 0009-sys-quota.h-sync-with-glibc.patch ce8a33a31f5a53031fbad8b1d1b66d44 uclibcconfig.x86 e861a17baa541accf4d4d39a98d74c32 uclibcconfig.x86_64 ce8a33a31f5a53031fbad8b1d1b66d44 uclibcconfig.i486 -- cgit v1.2.3