diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-07-11 15:12:26 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-07-11 15:12:26 +0000 |
commit | 8dc486ee9775482c1cdba0d59a176426210aca38 (patch) | |
tree | 5e35f2066b4bf386fadf1e5dd88b64f1ab467e5a /sys-apps | |
parent | Version bump, #271435 (diff) | |
download | gentoo-2-8dc486ee9775482c1cdba0d59a176426210aca38.tar.gz gentoo-2-8dc486ee9775482c1cdba0d59a176426210aca38.tar.bz2 gentoo-2-8dc486ee9775482c1cdba0d59a176426210aca38.zip |
Bug #276715: Failure to compile with newer kernel headers due to COMMAND_LINE_SIZE definition.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/openrc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.3/0003-command-line-size-fix.patch | 94 | ||||
-rw-r--r-- | sys-apps/openrc/openrc-0.4.3-r3.ebuild | 3 |
3 files changed, 102 insertions, 2 deletions
diff --git a/sys-apps/openrc/ChangeLog b/sys-apps/openrc/ChangeLog index 7315cad25581..77d21c302938 100644 --- a/sys-apps/openrc/ChangeLog +++ b/sys-apps/openrc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/openrc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.74 2009/06/15 11:11:23 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.75 2009/07/11 15:12:25 robbat2 Exp $ + + 11 Jul 2009; Robin H. Johnson <robbat2@gentoo.org> + +files/0.4.3/0003-command-line-size-fix.patch, openrc-0.4.3-r3.ebuild: + Bug #276715: Failure to compile with newer kernel headers due to + COMMAND_LINE_SIZE definition. 15 Jun 2009; Matthias Schwarzott <zzam@gentoo.org> openrc-9999.ebuild: Add missing leading slash to LIBEXECDIR. diff --git a/sys-apps/openrc/files/0.4.3/0003-command-line-size-fix.patch b/sys-apps/openrc/files/0.4.3/0003-command-line-size-fix.patch new file mode 100644 index 000000000000..85805b9db03c --- /dev/null +++ b/sys-apps/openrc/files/0.4.3/0003-command-line-size-fix.patch @@ -0,0 +1,94 @@ +Index: src/librc/librc.h +=================================================================== +--- src/librc/librc.h (revision 7c81f74b60b9d15ed472f1ca63cab0a105a84c08) ++++ src/librc/librc.h (revision 6abeec74301d8406ebbbd653b9fe9a0e234c09bf) +@@ -73,6 +73,4 @@ + #define librc_hidden_def(x) hidden_def(x) + +-ssize_t rc_getline(char **, size_t *, FILE *); +- + librc_hidden_proto(rc_config_list) + librc_hidden_proto(rc_config_load) +Index: src/librc/rc.h.in +=================================================================== +--- src/librc/rc.h.in (revision c0fd1b49e49cec28c1f5a3a76f9db11c62e550dc) ++++ src/librc/rc.h.in (revision 6abeec74301d8406ebbbd653b9fe9a0e234c09bf) +@@ -518,4 +518,8 @@ + RC_PIDLIST *rc_find_pids(const char *, const char *const *, uid_t, pid_t); + ++/* getline is a handy glibc function that not all libcs have, so ++ * we have our own */ ++ssize_t rc_getline(char **, size_t *, FILE *); ++ + __END_DECLS + #endif +Index: src/librc/rc.map +=================================================================== +--- src/librc/rc.map (revision 6615eb4b689d7aa1d047bd9ed75eca80beac9767) ++++ src/librc/rc.map (revision 6abeec74301d8406ebbbd653b9fe9a0e234c09bf) +@@ -13,4 +13,5 @@ + rc_environ_fd; + rc_find_pids; ++ rc_getline; + rc_newer_than; + rc_older_than; +Index: src/rc/rc.c +=================================================================== +--- src/rc/rc.c ++++ src/rc/rc.c +@@ -43,10 +43,6 @@ + #include <sys/utsname.h> + #include <sys/wait.h> + +-#ifdef __linux__ +-# include <asm/setup.h> /* for COMMAND_LINE_SIZE */ +-#endif +- + #include <errno.h> + #include <dirent.h> + #include <ctype.h> +@@ -176,10 +172,8 @@ + proc_getent(const char *ent) + { + FILE *fp; +- char proc[COMMAND_LINE_SIZE]; +- char *p; +- char *value = NULL; +- int i; ++ char *proc, *p, *value = NULL; ++ size_t i; + + if (!exists("/proc/cmdline")) + return NULL; +@@ -189,8 +183,10 @@ + return NULL; + } + +- memset(proc, 0, sizeof(proc)); +- fgets(proc, sizeof(proc), fp); ++ proc = NULL; ++ i = 0; ++ if (rc_getline(&proc, &i, fp) == -1 || proc == NULL) ++ eerror("rc_getline: %s", strerror(errno)); + if (*proc && (p = strstr(proc, ent))) { + i = p - proc; + if (i == '\0' || proc[i - 1] == ' ') { +@@ -202,6 +198,7 @@ + } else + errno = ENOENT; + fclose(fp); ++ free(proc); + + return value; + } +Index: src/test/rc.funcs.list +=================================================================== +--- src/test/rc.funcs.list (revision 6615eb4b689d7aa1d047bd9ed75eca80beac9767) ++++ src/test/rc.funcs.list (revision 6abeec74301d8406ebbbd653b9fe9a0e234c09bf) +@@ -21,4 +21,6 @@ + rc_find_pids + rc_find_pids@@RC_1.0 ++rc_getline ++rc_getline@@RC_1.0 + rc_newer_than + rc_newer_than@@RC_1.0 diff --git a/sys-apps/openrc/openrc-0.4.3-r3.ebuild b/sys-apps/openrc/openrc-0.4.3-r3.ebuild index f168f306c218..bb476bb3da1b 100644 --- a/sys-apps/openrc/openrc-0.4.3-r3.ebuild +++ b/sys-apps/openrc/openrc-0.4.3-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.3-r3.ebuild,v 1.2 2009/06/08 19:38:42 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.4.3-r3.ebuild,v 1.3 2009/07/11 15:12:25 robbat2 Exp $ inherit eutils flag-o-matic multilib toolchain-funcs @@ -67,6 +67,7 @@ src_unpack() { epatch "${FILESDIR}"/0.4.2/0003-KV.patch epatch "${FILESDIR}"/0.4.3/0001-fix-is_older_than.patch epatch "${FILESDIR}"/0.4.3/0002-support-custom-status.patch + epatch "${FILESDIR}"/0.4.3/0003-command-line-size-fix.patch } src_compile() { |