Bug 3081 - Build fails on IRIX since memmem() is not declared
Summary: Build fails on IRIX since memmem() is not declared
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 8.1p1
Hardware: MIPS IRIX
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_2
  Show dependency treegraph
 
Reported: 2019-10-10 06:33 AEDT by mindrot
Modified: 2021-04-23 14:56 AEST (History)
1 user (show)

See Also:


Attachments
declare MEMMEM patch (427 bytes, patch)
2019-10-10 06:33 AEDT, mindrot
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mindrot 2019-10-10 06:33:39 AEDT
Created attachment 3334 [details]
declare MEMMEM patch

Compilation of sshbuf-misc.c, fails on IRIX:


cc-1196 c99: WARNING File = sshbuf-misc.c, Line = 225
  The indicated function is declared implicitly.

        if ((p = memmem(sshbuf_ptr(b) + start_offset,
                 ^

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,
               ^

1 error detected in the compilation of "sshbuf-misc.c".

I would suspect that there's a typo in openbsd-compat.h in that #ifdef has been used instead of #ifndef for HAVE_MEMMEM. With the trivial patch below, compilation succeeds for me on IRIX 6.5.30.
Comment 1 Darren Tucker 2019-10-10 09:47:24 AEDT
Done, thanks.  It'll be in the next release.
Comment 2 Damien Miller 2021-04-23 14:56:57 AEST
closing resolved bugs as of 8.6p1 release