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

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

      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.

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

              Created:
              Updated: