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) { ------------^
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) {
*** Bug 929 has been marked as a duplicate of this bug. ***
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.
Did you note in the logs that Openssh 3.8.1p1 compilation has no -std1 option? Probably that's the real cause.
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.
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.