summaryrefslogtreecommitdiff
path: root/src/plugins/imb/imbapi.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-02-20 02:12:40 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-02-20 02:12:40 +0100
commit97d6a2e491c6ed08473beb2c4bac47c5cbc1201a (patch)
tree728b931c62b22ea55a13b292f6f77930897067fd /src/plugins/imb/imbapi.c
parent55031e72e6c02b4ae63e9052bad1a4b40002ac18 (diff)
Imported Upstream version 1.8.16upstream/1.8.16
Diffstat (limited to 'src/plugins/imb/imbapi.c')
-rw-r--r--src/plugins/imb/imbapi.c11
1 files changed, 7 insertions, 4 deletions
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];