Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 197153 Details for
Bug 276715
sys-apps/openrc-0.4.3-r3 compilation failure with sys-kernel/linux-headers-2.6.30
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
openrc-0.4.3-command-line-size-fix.diff
openrc-0.4.3-command-line-size-fix.diff (text/plain), 2.58 KB, created by
Lars Wendler (Polynomial-C) (RETIRED)
on 2009-07-08 08:09:58 UTC
(
hide
)
Description:
openrc-0.4.3-command-line-size-fix.diff
Filename:
MIME Type:
Creator:
Lars Wendler (Polynomial-C) (RETIRED)
Created:
2009-07-08 08:09:58 UTC
Size:
2.58 KB
patch
obsolete
>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
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 276715
: 197153