Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21539

Drop use of hstrerror() in favour of gai_strerror()

    XMLWordPrintable

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 6.4.0alpha1
    • None
    • Agent (G), Proxy (P), Server (S)
    • None
    • AIX 7.1, Linux

    Description

      When compiling the zbxcomms library on AIX, we noticed that hstrerror() was being detected during configure's feature tests, but the compiler raises a warning when compiling the comms.c module, as it fails to see the prototype for the function, which is behind a feature guard macro (_USE_IRS) on AIX, which we don't define.

      Linux marks gethostby*(3) and hstrerror(3) to be obsolete, and advises switching to getaddr*(3) and gai_strerror(3) instead.

      We already use the getaddr*(3) family and the use of hstrerror(3) seems to be an artefact, so I suggest we just make the leap and switch.

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            jlambda Juris Lambda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: