- Patch the code to enable clean compiling on legacy (4.x) BSD systems.

PR:		ports/148269
Submitted by:	sbruno
Approved by:	Steve Polyack <spolyack at collaborativefusion dot com> (maintainer)
This commit is contained in:
Greg Larkin 2010-07-28 14:04:20 +00:00
parent 085b7e6d52
commit d804999a0c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258384
6 changed files with 137 additions and 2 deletions

View file

@ -14,13 +14,13 @@ MAINTAINER= spolyack@collaborativefusion.com
COMMENT= CLI to manage IPMI systems
USE_BZIP2= yes
DOS2UNIX= ipmi_fwum.c
USE_GMAKE= yes
USE_OPENSSL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-intf-lan --enable-intf-lanplus \
--disable-intf-imb --disable-intf-lipmi --disable-intf-bmc
CONFIGURE_ENV+= CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}"
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
PLIST_FILES= bin/ipmitool sbin/ipmievd share/ipmitool/oem_ibm_sel_map
PLIST_DIRS= share/ipmitool
PORTDOCS= AUTHORS COPYING ChangeLog README

View file

@ -0,0 +1,11 @@
--- ./include/ipmitool/ipmi_sdr.h.orig 2009-02-25 15:38:52.000000000 -0500
+++ ./include/ipmitool/ipmi_sdr.h 2010-07-23 14:46:07.000000000 -0400
@@ -277,7 +277,7 @@
uint16_t settable:8;
#endif
} read;
- };
+ } type;
} threshold;
} type;
} __attribute__ ((packed));

View file

@ -0,0 +1,21 @@
--- ./lib/ipmi_fru.c.orig 2009-02-25 15:38:52.000000000 -0500
+++ ./lib/ipmi_fru.c 2010-07-23 14:46:07.000000000 -0400
@@ -489,7 +489,8 @@
struct ipmi_rq req;
uint8_t msg_data[25];
uint8_t writeLength;
- uint16_t num_bloc;
+ uint16_t num_bloc;
+ t_ipmi_fru_bloc * fru_bloc;
finish = doffset + length; /* destination offset */
if (finish > fru->size)
@@ -498,7 +499,7 @@
return -1;
}
- t_ipmi_fru_bloc * fru_bloc = build_fru_bloc(intf, fru, id, &num_bloc);
+ fru_bloc = build_fru_bloc(intf, fru, id, &num_bloc);
memset(&req, 0, sizeof(req));
req.msg.netfn = IPMI_NETFN_STORAGE;

View file

@ -0,0 +1,83 @@
--- ./lib/ipmi_sdr.c.orig 2009-02-25 15:38:52.000000000 -0500
+++ ./lib/ipmi_sdr.c 2010-07-23 14:46:07.000000000 -0400
@@ -775,7 +775,7 @@
/* helper macro for printing sensor thresholds */
#define SENSOR_PRINT_THRESH(NAME, READ, FLAG) \
if (sensor->sensor.init.thresholds && \
- sensor->mask.type.threshold.read.FLAG != 0) { \
+ sensor->mask.type.threshold.type.read.FLAG != 0) { \
printf(" %-21s : ", NAME); \
printf("%.3f\n", sdr_convert_sensor_reading( \
sensor, sensor->threshold.READ)); \
@@ -1247,17 +1247,17 @@
sensor->normal_min);
SENSOR_PRINT_CSV(sensor->analog_flag.normal_max,
sensor->normal_max);
- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.unr,
+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.unr,
sensor->threshold.upper.non_recover);
- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.ucr,
+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.ucr,
sensor->threshold.upper.critical);
- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.unc,
+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.unc,
sensor->threshold.upper.non_critical);
- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.lnr,
+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.lnr,
sensor->threshold.lower.non_recover);
- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.lcr,
+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.lcr,
sensor->threshold.lower.critical);
- SENSOR_PRINT_CSV(sensor->mask.type.threshold.read.lnc,
+ SENSOR_PRINT_CSV(sensor->mask.type.threshold.type.read.lnc,
sensor->threshold.lower.non_critical);
printf("%.3f,%.3f",
@@ -1485,17 +1485,17 @@
break;
case 1: /* readable according to mask */
case 2: /* readable and settable according to mask */
- if (sensor->mask.type.threshold.read.lnr)
+ if (sensor->mask.type.threshold.type.read.lnr)
printf("lnr ");
- if (sensor->mask.type.threshold.read.lcr)
+ if (sensor->mask.type.threshold.type.read.lcr)
printf("lcr ");
- if (sensor->mask.type.threshold.read.lnc)
+ if (sensor->mask.type.threshold.type.read.lnc)
printf("lnc ");
- if (sensor->mask.type.threshold.read.unc)
+ if (sensor->mask.type.threshold.type.read.unc)
printf("unc ");
- if (sensor->mask.type.threshold.read.ucr)
+ if (sensor->mask.type.threshold.type.read.ucr)
printf("ucr ");
- if (sensor->mask.type.threshold.read.unr)
+ if (sensor->mask.type.threshold.type.read.unr)
printf("unr ");
printf("\n");
break;
@@ -1511,17 +1511,17 @@
break;
case 1: /* readable according to mask */
case 2: /* readable and settable according to mask */
- if (sensor->mask.type.threshold.set.lnr)
+ if (sensor->mask.type.threshold.type.set.lnr)
printf("lnr ");
- if (sensor->mask.type.threshold.set.lcr)
+ if (sensor->mask.type.threshold.type.set.lcr)
printf("lcr ");
- if (sensor->mask.type.threshold.set.lnc)
+ if (sensor->mask.type.threshold.type.set.lnc)
printf("lnc ");
- if (sensor->mask.type.threshold.set.unc)
+ if (sensor->mask.type.threshold.type.set.unc)
printf("unc ");
- if (sensor->mask.type.threshold.set.ucr)
+ if (sensor->mask.type.threshold.type.set.ucr)
printf("ucr ");
- if (sensor->mask.type.threshold.set.unr)
+ if (sensor->mask.type.threshold.type.set.unr)
printf("unr ");
printf("\n");
break;

View file

@ -0,0 +1,10 @@
--- ./src/ipmishell.c.orig 2009-02-25 15:38:52.000000000 -0500
+++ ./src/ipmishell.c 2010-07-23 14:46:07.000000000 -0400
@@ -57,7 +57,6 @@
#ifdef HAVE_READLINE
/* avoid warnings errors due to non-ANSI type declarations in readline.h */
-#define _FUNCTION_DEF
#define USE_VARARGS
#define PREFER_STDARG

View file

@ -0,0 +1,10 @@
--- ./src/plugins/lan/lan.c.orig 2009-02-25 15:38:53.000000000 -0500
+++ ./src/plugins/lan/lan.c 2010-07-23 14:46:07.000000000 -0400
@@ -36,6 +36,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>