#1 tmpwatch does not compile for Solaris
Closed: Fixed Opened by stpierre.

The latest version of tmpwatch does not compile for Solaris because the functions setmntent and getmntent do no exist on Solaris. It looks like around version 2.9, the ifdefs that used to protect these calls were removed.


Thanks for your report.

There might have been other incompatible changes; can you provide a tested patch, please?

I'm afraid I don't know enough to determine what the right fix is.
However, if you can suggest a patch to try, I can try it out for you.

Please attach your build log and I'll see what I can do - but I can't promise anything.

setmntent and getmntent are not used any more on Solaris in tmpwatch-2.9.14, so tmpwatch might compile correctly on Solaris again.

Please reopen this report if it still doesn't compile, and attach your build log.

Confirmed that it now works on Solaris. However, I get the following warning when it compiles:

gcc -W -Wall -DVERSION=\"2.9.14\" -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE tmpwatch.c -o tmpwatch
tmpwatch.c: In function 'check_fuser':
tmpwatch.c:224: warning: missing sentinel in function call

$ gcc --version
gcc (GCC) 4.3.2

Note that the previous message was for Solaris 2.10

Thanks. That warning is incorrect, but the line is not completely portable; fixed in changeset [128:f68ac1718b83].

Metadata