Bug 940 - xmmap.c noequality compile error on Digital UNIX 4.0F PK7
Summary: xmmap.c noequality compile error on Digital UNIX 4.0F PK7
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 3.9p1
Hardware: Alpha OSF/1
: P2 critical
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
: 929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-06 04:20 AEST by Andrea
Modified: 2006-10-07 11:37 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea 2004-10-06 04:20:03 AEST
On Digital UNIX 4.0F (patch-kit 7), after configure with only zlib path, make
command fails with this error:

root@plutone/var/appoggio/openssh-3.9p1# make
(cd openbsd-compat && make)
cc -std1 -g -I. -I.. -I. -I./.. -I/usr/local/ssl/include -I/usr/local/include 
-DHAVE_CONFIG_H -c xmmap.c
cc: Error: xmmap.c, line 50: In this statement, "address" and "(-1)" cannot be
compared for equality or inequality. (noequality)
        if (address == MAP_FAILED) {
------------^
*** Exit 1
Stop.
*** Exit 1
Stop.

Openssh 3.8.1p1 compiles fine giving just this warning:

cc -g -I. -I.. -I. -I./.. -I/usr/local/ssl/include -I/usr/local/include 
-DHAVE_CONFIG_H -c xmmap.c
cc: Warning: xmmap.c, line 50: In this statement, "(-1)" of type "long", is
being converted to "pointer to void". (cvtdiftypes)
        if (address == MAP_FAILED) {
------------^
Comment 1 Darren Tucker 2004-10-06 08:21:31 AEST
I can't see why that would fail in 3.9p1 and work in 3.8.1p1 since xmmap.c has
changed only minimally and that chunk of code hasn't changed at all.

Can you try casting the constant to void *, ie change:
if (address == MAP_FAILED) {
to:
if (address == (void *)MAP_FAILED) {
Comment 2 Darren Tucker 2004-10-06 21:47:14 AEST
*** Bug 929 has been marked as a duplicate of this bug. ***
Comment 3 Andrea 2004-10-06 22:24:58 AEST
With the change you suggested xmmap.c compiles with no warning at all.

Making all gives the same error with monitor_mm.c

cc -std1 -g -I. -I. -I/usr/local/ssl/include -I/usr/local/include 
-DSSHDIR=\"/usr/local/etc\"  -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" 
-D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" 
-D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" 
-D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" 
-D_PATH_SSH_PIDDIR=\"/var/run\"  -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" 
-DSSH_RAND_HELPER=\"/usr/local/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c
monitor_mm.c
cc: Error: monitor_mm.c, line 95: In this statement, "address" and "(-1)" cannot
be compared for equality or inequality. (noequality)
        if (address == MAP_FAILED)
------------^
*** Exit 1
Stop.

I made the same change and now it compiles.
I cannot do "make install" and complete tests now but the new compiled ssh
client seems to work just fine.

Comment 4 Andrea 2004-10-06 22:32:24 AEST
Did you note in the logs that Openssh 3.8.1p1 compilation has no -std1 option?
Probably that's the real cause.
Comment 5 Darren Tucker 2004-10-06 23:16:38 AEST
I didn't notice that and you're probably right, that would explain it.  It's
probably due to the newer version of autoconf used for 3.9p1 (2.59 vs 2.52).

Anyway, both changes applied, thanks for the report.
Comment 6 Darren Tucker 2006-10-07 11:37:28 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.