Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 202399 | Differences between
and this patch

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
41
#endif
41
#endif
42
42
43
#ifdef HAVE_LIBRPM
43
#ifdef HAVE_LIBRPM
44
#include <stdio.h>
45
#include <stdint.h>
44
#include <rpm/rpmlib.h>
46
#include <rpm/rpmlib.h>
45
#include <rpm/header.h>
47
#include <rpm/rpm4compat.h>
46
#include <fcntl.h>
48
#include <fcntl.h>
47
49
48
#ifdef HAVE_RPMGETPATH
50
#ifdef HAVE_RPMGETPATH
Lines 465-470 Link Here
465
            if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
467
            if ( headerGetEntry(swi->swi_h, RPMTAG_INSTALLTIME, NULL, (void **) &rpm_data, NULL) ) {
466
                time_t          installTime = *rpm_data;
468
                time_t          installTime = *rpm_data;
467
                ret = date_n_time(&installTime, var_len);
469
                ret = date_n_time(&installTime, var_len);
470
		free((void *)rpm_data);
468
            } else {
471
            } else {
469
                ret = date_n_time(0, var_len);
472
                ret = date_n_time(0, var_len);
470
            }
473
            }
Lines 661-666 Link Here
661
                       NULL);
664
                       NULL);
662
        snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
665
        snprintf(swi->swi_name, sizeof(swi->swi_name), "%s-%s-%s", n, v, r);
663
        swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
666
        swi->swi_name[ sizeof(swi->swi_name)-1 ] = 0;
667
	free((void *)n);
668
	free((void *)v);
669
	free((void *)r);
664
    }
670
    }
665
#else
671
#else
666
    snprintf(swi->swi_name, sizeof(swi->swi_name), swi->swi_dep->d_name);
672
    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
2760
  fi
2760
  fi
2761
])
2761
])
2762
2762
2763
AC_CHECK_HEADERS(rpm/rpmlib.h rpm/header.h)
2763
AC_CHECK_HEADERS(rpm/rpmlib.h rpm/rpmtag.h)
2764
2764
2765
AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
2765
AC_CHECK_HEADER(rpm/rpmlib.h,rpmlib_h=yes,rpmlib_h=no)
2766
AC_CHECK_HEADER(rpm/header.h,rpmheader_h=yes,rpmheader_h=no)
2766
AC_CHECK_HEADER(rpm/rpmtag.h,rpmtag_h=yes,rpmtag_h=no)
2767
2767
2768
if test "x$rpmheader_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
2768
if test "x$rpmtag_h" = "xno" -o "x$rpmlib_h" = "xno" ; then
2769
  if test "x$with_rpm" = "xyes" ; then
2769
  if test "x$with_rpm" = "xyes" ; then
2770
    AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
2770
    AC_MSG_ERROR([Could not find either the RPM header files needed and was specifically asked to use RPM support])
2771
  else
2771
  else

Return to bug 202399