From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.6) Gecko/20011120 Description of problem: Despite the instructions in README.hpux, tmpwatch 2.8 fails to compile on HP-UX 11.11 (and, I would assume, other versions too). Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. make Actual Results: > make HP_UX=true gcc -Wall -DVERSION=\"2.8\" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE tmpwatch.c -o tmpwatch tmpwatch.c:30: paths.h: No such file or directory make: *** [tmpwatch] Error 1 Exit 2 Additional info: The following patch allows tmpwatch to compile on HP-UX 11.11. It seems to work fine, but I should point out that I don't actually know C, so if I've done something stupid then that's why :-) --- tmpwatch.c Tue Aug 28 19:50:00 2001 +++ tmpwatch.c.new Fri Jan 25 14:15:44 2002 @@ -14,6 +14,7 @@ #ifndef __hpux #include <getopt.h> +#include <paths.h> #endif #include <stdarg.h> @@ -27,7 +28,6 @@ #include <sys/wait.h> #include <utime.h> #include <unistd.h> -#include <paths.h> #include <mntent.h> #define LOG_REALDEBUG 1 @@ -324,6 +324,7 @@ if (*significant_time >= killTime) continue; +#ifndef __hpux /* check if it is an ext3 journal file */ if ((strcmp(ent->d_name, ".journal") == 0) && (sb.st_uid == 0)) { @@ -352,7 +353,8 @@ continue; } } - +#endif + if ((flags & FLAG_ALLFILES) || S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) {
Ok, thanks for the patch. I'll have a look next time I am playing with tmpwatch.
pts/19 mharris@devel:~/src/redhat/tmpwatch$ patch -p0 < ../tmpwatch-hpux.patch patching file tmpwatch.c patch: **** malformed patch at line 8: #endif Please do not cut and paste patches into bug reports or email, it usually results in a patch that fails due to whitespace changes in tabs/spaces and all sorts of other problems. Could you please resubmit this patch as a file attachment using the file attach feature below? Thanks.
Created attachment 43877 [details] tmpwatch patch for HP-UX
Fix added to tmpwatch 2.8.2-1 in rawhide. Thanks.