cc-1515 c99: ERROR File = sshbuf-misc.c, Line = 225 A value of type "int" cannot be assigned to an entity of type "void *". if ((p = memmem(sshbuf_ptr(b) + start_offset, This can be easily fixed by changing line 215 from void *p; to size_t p;
(In reply to Ole Weidner from comment #0) > cc-1515 c99: ERROR File = sshbuf-misc.c, Line = 225 > A value of type "int" cannot be assigned to an entity of type > "void *". > > if ((p = memmem(sshbuf_ptr(b) + start_offset, > > This can be easily fixed by changing line 215 from void *p to > to size_t p That's not correct, though. Although it's not standardized, the consensus seems to be memmem returns a void * (http://man7.org/linux/man-pages/man3/memmem.3.html) and that's certainly what OpenSSH expects (https://man.openbsd.org/memmem). Does IRIX define its own memmem to return an integer type (ie is HAVE_MEMMEM in config.h) or is this a result of a missing prototype? (It's defined in openbsd-compat.h which is pulled in via includes.h, but it's possible there might be some reason it doesn't work).
HAVE_MEMMEM is not defined in config.h and I couldn't find any traces of it in the IRIX system includes.
Created attachment 3342 [details] check if memmem is declared and use for compat prototype (In reply to Ole Weidner from comment #2) > HAVE_MEMMEM is not defined in config.h and I couldn't find any > traces of it in the IRIX system includes. If you don't have HAVE_MEMMEM in config.h then I'm not sure what's going on. You could check config.log and look for the memmem test output. I did find one way to reproduce a similar error: where configure is picking up a memmem from somewhere (maybe libc, or maybe one of the other dependencies, I reproduced with gcc and a -lmemmem in LIBS) but that will result in HAVE_MEMMEM in config.h. The compat code only defines the prototype #ifndef HAVE_MEMMEM, thus in this case nothing defines it so it defaults to int and you get the mismatch. The attached patch fixes what I found (note that you will need to run autoreconfig from autoconf 2.69 to rebuild configure before running it). It's worth trying for your case too. The other potential gotcha: if you have a different config.h elsewhere in your search path you might not be using the one you think you are.
I've committed that diff, I would be interested to know whether or not it makes a difference in this case. You can try as snapshot (https://www.mindrot.org/openssh_snap/) or current git tree.
The diff indeed makes a difference and openssh compiles without any issue now The following warning pops up during linkage: ld32: WARNING 84 : openbsd-compat/libopenbsd-compat.a is not used for resolving any symbol. The executable works fine.
closing resolved bugs as of 8.6p1 release