Bug 58834 - compile fails on HP-UX
Summary: compile fails on HP-UX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch   
(Show other bugs)
Version: 7.2
Hardware: other Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2002-01-25 15:48 UTC by Need Real Name
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-29 11:27:50 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tmpwatch patch for HP-UX (713 bytes, patch)
2002-01-29 11:27 UTC, Need Real Name
no flags Details | Diff

Description Need Real Name 2002-01-25 15:48:43 UTC
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:

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>
 #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)
+#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 @@
 	    if ((flags & FLAG_ALLFILES) ||
	S_ISREG(sb.st_mode) ||
	S_ISLNK(sb.st_mode)) {

Comment 1 Mike A. Harris 2002-01-25 16:09:36 UTC
Ok, thanks for the patch.  I'll have a look next time I am playing with

Comment 2 Mike A. Harris 2002-01-28 04:11:41 UTC
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?


Comment 3 Need Real Name 2002-01-29 11:27:46 UTC
Created attachment 43877 [details]
tmpwatch patch for HP-UX

Comment 4 Mike A. Harris 2002-01-30 02:07:52 UTC
Fix added to tmpwatch 2.8.2-1 in rawhide.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.