File listps-fix_conflicting_getline.patch of Package listps
--- listps.c.orig 2011-10-08 18:24:14.241000420 +0200
+++ listps.c 2011-10-08 18:24:41.849000421 +0200
@@ -103,7 +103,7 @@
return s;
}
-char* getline(FILE *f) {
+char* readline(FILE *f) {
static char s[1024];
*s = 0;
if ( f ) fgets(s, sizeof(s), f);
@@ -130,12 +130,12 @@
for ( pid = def_opts.pid_start; pid < def_opts.pid_stop; ++pid ) {
if ( (f = fopen(mk_filename(pid, "cmdline"), "rb"))!=NULL ) {
- p = getline(f);
+ p = readline(f);
fclose(f);
if ( !*p ) {
if ( (fs = fopen(mk_filename(pid, "stat"), "rb"))!=NULL ) {
- p = skipto(getline(fs), ' ')+1; // skip first field
+ p = skipto(readline(fs), ' ')+1; // skip first field
*skipto(p, ' ') = 0; // terminate here
fclose(fs);
}