View | Details | Raw Unified
Collapse All | Expand All

(-) net-snmp-5.4.1.1.orig/agent/mibgroup/host/hr_swinst.c (-1 / +7 lines)
 Lines 41-48    Link Here 
#endif
#endif
#ifdef HAVE_LIBRPM
#ifdef HAVE_LIBRPM
#include <stdio.h>
#include <stdint.h>
#include <rpm/rpmlib.h>
#include <rpm/rpmlib.h>
#include <rpm/header.h>
#include <rpm/rpm4compat.h>
#include <fcntl.h>
#include <fcntl.h>
#ifdef HAVE_RPMGETPATH
#ifdef HAVE_RPMGETPATH
 Lines 465-470    Link Here 
            if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
            if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
                time_t          installTime = *rpm_data;
                time_t          installTime = *rpm_data;
                ret = date_n_time(&installTime, var_len);
                ret = date_n_time(&installTime, var_len);
		free((void *)rpm_data);
            } else {
            } else {
                ret = date_n_time(0, var_len);
                ret = date_n_time(0, var_len);
            }
            }
 Lines 661-666    Link Here 
                       NULL);
                       NULL);
        snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
        snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
        swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
        swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
	free((void *)n);
	free((void *)v);
	free((void *)r);
    }
    }
#else
#else
    snprintf(swi->swi_name, sizeof(swi->swi_name), swi->swi_dep->d_name);
    snprintf(swi->swi_name, sizeof(swi->swi_name), swi->swi_dep->d_name);
(-) net-snmp-5.4.1.1.orig/configure.in (-3 / +3 lines)
 Lines 2760-2771    Link Here 
  fi
  fi
])
])
AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h)
AC_CHECK_HEADERS(rpm/rpmlib.h rpm/rpmtag.h)
AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no)
AC_CHECK_HEADER(rpm/rpmtag.h,rpmtag_h=yes,rpmtag_h=no)
if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
if test "x$rpmtag_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
  if test "x$with_rpm" = "xyes" ; then
  if test "x$with_rpm" = "xyes" ; then
    AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
    AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
  else
  else