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

Cannot compile Zabbix server/proxy on Solaris 10

    Details

      Description

      Compilation of Zabbix server/proxy on Solaris SPARC fails with error:

      snmptrapper.c: In function `read_traps':
      snmptrapper.c:416: error: `INT_MAX' undeclared (first use in this function)
      snmptrapper.c:416: error: (Each undeclared identifier is reported only once
      snmptrapper.c:416: error: for each function it appears in.)
      snmptrapper.c: In function `open_trap_file':
      snmptrapper.c:475: error: `INT_MAX' undeclared (first use in this function)
      snmptrapper.c: In function `get_latest_data':
      snmptrapper.c:541: error: `INT_MAX' undeclared (first use in this function)
      

      I solved it by replacing INT_MAX with ZBX_MAX_UINT64 in file src/zabbix_server/snmptrapper/snmptrapper.c:

      416c416
      <               if (INT_MAX < (zbx_uint64_t)trap_lastsize + nbytes)
      ---
      >               if (ZBX_MAX_UINT64 < (zbx_uint64_t)trap_lastsize + nbytes)
      475c475
      <       if (INT_MAX < file_buf.st_size)
      ---
      >       if (ZBX_MAX_UINT64 < file_buf.st_size)
      541c541
      <               else if (INT_MAX < file_buf.st_size)
      ---
      >               else if (ZBX_MAX_UINT64 < file_buf.st_size)
      

      There were the issues like this before: ZBX-5782 and ZBX-4555.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              akint Anton Alekseev
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: