summaryrefslogtreecommitdiff
path: root/src/plugins/imb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/imb')
-rw-r--r--src/plugins/imb/Makefile.in2
-rw-r--r--src/plugins/imb/imb.c12
-rw-r--r--src/plugins/imb/imbapi.c11
3 files changed, 15 insertions, 10 deletions
diff --git a/src/plugins/imb/Makefile.in b/src/plugins/imb/Makefile.in
index a65eca7..d1ded78 100644
--- a/src/plugins/imb/Makefile.in
+++ b/src/plugins/imb/Makefile.in
@@ -241,6 +241,8 @@ INTF_OPEN = @INTF_OPEN@
INTF_OPEN_LIB = @INTF_OPEN_LIB@
INTF_SERIAL = @INTF_SERIAL@
INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
LD = @LD@
LDFLAGS = @LDFLAGS@
diff --git a/src/plugins/imb/imb.c b/src/plugins/imb/imb.c
index cb97e81..0044159 100644
--- a/src/plugins/imb/imb.c
+++ b/src/plugins/imb/imb.c
@@ -121,11 +121,11 @@ static struct ipmi_rs * ipmi_imb_send_cmd(struct ipmi_intf * intf, struct ipmi_r
}
struct ipmi_intf ipmi_imb_intf = {
- name: "imb",
- desc: "Intel IMB Interface",
- open: ipmi_imb_open,
- close: ipmi_imb_close,
- sendrecv: ipmi_imb_send_cmd,
- target_addr: IPMI_BMC_SLAVE_ADDR,
+ .name = "imb",
+ .desc = "Intel IMB Interface",
+ .open = ipmi_imb_open,
+ .close = ipmi_imb_close,
+ .sendrecv = ipmi_imb_send_cmd,
+ .target_addr = IPMI_BMC_SLAVE_ADDR,
};
diff --git a/src/plugins/imb/imbapi.c b/src/plugins/imb/imbapi.c
index 37d3abe..899c47a 100644
--- a/src/plugins/imb/imbapi.c
+++ b/src/plugins/imb/imbapi.c
@@ -97,6 +97,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string.h>
#endif
#include "imbapi.h"
+#include <asm/socket.h>
#ifdef SCO_UW
#define NO_MACRO_ARGS 1
@@ -104,7 +105,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define IMB_DEVICE "/dev/instru/mismic"
#else
#define IMB_DEVICE "/dev/imb"
-#define PAGESIZE EXEC_PAGESIZE
+#ifndef PAGESIZE
+# define PAGESIZE EXEC_PAGESIZE
+#endif
#endif
/*Just to make the DEBUG code cleaner.*/
@@ -1981,7 +1984,7 @@ MapPhysicalMemory(int startAddress,int addressLength, int *virtualAddress )
unsigned int length = addressLength;
off_t startpAddress = (off_t)startAddress;
unsigned int diff;
- caddr_t startvAddress;
+ char *startvAddress;
if ((startAddress == 0) || (addressLength <= 0))
return ACCESN_ERROR;
@@ -2000,13 +2003,13 @@ MapPhysicalMemory(int startAddress,int addressLength, int *virtualAddress )
startpAddress -= diff;
length += diff;
- if ( (startvAddress = mmap( (caddr_t)0,
+ if ( (startvAddress = mmap(0,
length,
PROT_READ,
MAP_SHARED,
fd,
startpAddress
- ) ) == (caddr_t)-1)
+ ) ) == MAP_FAILED)
{
char buf[128];