Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions include/fmadio_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ typedef struct fFMADRingHeader_t
u32 Size; // size of entire structure
u32 SizePacket; // size of a packet

u8 Path[128]; // path of ring
char Path[128]; // path of ring

u64 Depth; // depth of the ring
u64 Mask; // counter mask
Expand Down Expand Up @@ -154,7 +154,7 @@ typedef struct fFMADRingHeader_t
static inline int FMADPacket_OpenTx( int* pfd,
fFMADRingHeader_t** pRing,
bool IsReset,
u8* Path,
const char* Path,
bool IsFlowControl,
u64 TimeoutNS
){
Expand Down Expand Up @@ -188,7 +188,7 @@ static inline int FMADPacket_OpenTx( int* pfd,
}

// map it
u8* Map = mmap64(0, FMADRING_MAPSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
u8* Map = (u8*)mmap64(0, FMADRING_MAPSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (Map == (u8*)-1)
{
fprintf(stderr, "RING[%-50s]failed to map RING\n", Path);
Expand Down Expand Up @@ -257,7 +257,7 @@ static inline int FMADPacket_OpenTx( int* pfd,
static inline int FMADPacket_OpenRx( int* pfd,
fFMADRingHeader_t** pRing,
bool IsWait,
u8* Path
const char* Path
){
int fd = 0;

Expand All @@ -269,7 +269,7 @@ static inline int FMADPacket_OpenRx( int* pfd,
}

// map it
u8* Map = mmap64(0, FMADRING_MAPSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
u8* Map = (u8*)mmap64(0, FMADRING_MAPSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (Map == (u8*)-1)
{
fprintf(stderr, "RING[%-50s] failed to map RING\n", Path);
Expand Down Expand Up @@ -313,7 +313,7 @@ static inline int FMADPacket_OpenRx( int* pfd,
// open fmad packet ring for monitoring only (read only)
static inline int FMADPacket_OpenMon( int* pfd,
fFMADRingHeader_t** pRing,
u8* Path
const char* Path
){
int fd = 0;

Expand All @@ -325,7 +325,7 @@ static inline int FMADPacket_OpenMon( int* pfd,
}

// map it
u8* Map = mmap64(0, FMADRING_MAPSIZE, PROT_READ, MAP_SHARED, fd, 0);
u8* Map = (u8*)mmap64(0, FMADRING_MAPSIZE, PROT_READ, MAP_SHARED, fd, 0);
if (Map == (u8*)-1)
{
fprintf(stderr, "RING[%-50s] ERROR failed to map RING (read only)\n", Path);
Expand Down