Bug 58834 - compile fails on HP-UX
compile fails on HP-UX
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch (Show other bugs)
7.2
other Linux
medium Severity low
: ---
: ---
Assigned To: Mike A. Harris
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-25 10:48 EST by Need Real Name
Modified: 2007-04-18 12:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-29 06:27:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 06:27 EST, Need Real Name
no flags Details | Diff

  None (edit)
Description Need Real Name 2002-01-25 10:48:43 EST
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)) {
Comment 1 Mike A. Harris 2002-01-25 11:09:36 EST
Ok, thanks for the patch.  I'll have a look next time I am playing with
tmpwatch.
Comment 2 Mike A. Harris 2002-01-27 23:11:41 EST
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.
Comment 3 Need Real Name 2002-01-29 06:27:46 EST
Created attachment 43877 [details]
tmpwatch patch for HP-UX
Comment 4 Mike A. Harris 2002-01-29 21:07:52 EST
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.