aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ipmitool
diff options
context:
space:
mode:
authorGreg Larkin <glarkin@FreeBSD.org>2010-07-28 14:04:20 +0000
committerGreg Larkin <glarkin@FreeBSD.org>2010-07-28 14:04:20 +0000
commitd804999a0cec9bb0e45c82732d7fa43b98be211e (patch)
tree726fcdcc8f14c84d89df423cb142d80936f68a16 /sysutils/ipmitool
parent085b7e6d52e62c2f98f3159d410c63e24d9fda43 (diff)
downloadports-d804999a0cec9bb0e45c82732d7fa43b98be211e.tar.gz
ports-d804999a0cec9bb0e45c82732d7fa43b98be211e.zip
- 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)
Notes
Notes: svn path=/head/; revision=258384
Diffstat (limited to 'sysutils/ipmitool')
-rw-r--r--sysutils/ipmitool/Makefile4
-rw-r--r--sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h11
-rw-r--r--sysutils/ipmitool/files/patch-lib__ipmi_fru.c21
-rw-r--r--sysutils/ipmitool/files/patch-lib__ipmi_sdr.c83
-rw-r--r--sysutils/ipmitool/files/patch-src__ipmishell.c10
-rw-r--r--sysutils/ipmitool/files/patch-src__plugins__lan__lan.c10
6 files changed, 137 insertions, 2 deletions
diff --git a/sysutils/ipmitool/Makefile b/sysutils/ipmitool/Makefile
index 95fde3cea74e..0d081b99bf82 100644
--- a/sysutils/ipmitool/Makefile
+++ b/sysutils/ipmitool/Makefile
@@ -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
diff --git a/sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h b/sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h
new file mode 100644
index 000000000000..c8e6db43ffe6
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-include__ipmitool__ipmi_sdr.h
@@ -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));
diff --git a/sysutils/ipmitool/files/patch-lib__ipmi_fru.c b/sysutils/ipmitool/files/patch-lib__ipmi_fru.c
new file mode 100644
index 000000000000..354f5a97b1de
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-lib__ipmi_fru.c
@@ -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;
diff --git a/sysutils/ipmitool/files/patch-lib__ipmi_sdr.c b/sysutils/ipmitool/files/patch-lib__ipmi_sdr.c
new file mode 100644
index 000000000000..92374cb8147e
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-lib__ipmi_sdr.c
@@ -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;
diff --git a/sysutils/ipmitool/files/patch-src__ipmishell.c b/sysutils/ipmitool/files/patch-src__ipmishell.c
new file mode 100644
index 000000000000..d68cc9bb3230
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-src__ipmishell.c
@@ -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
+
diff --git a/sysutils/ipmitool/files/patch-src__plugins__lan__lan.c b/sysutils/ipmitool/files/patch-src__plugins__lan__lan.c
new file mode 100644
index 000000000000..18673895430e
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-src__plugins__lan__lan.c
@@ -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>