Create prototype for IPC_CREATE macro on linux,
and change return type to pointer.
This commit is contained in:
parent
c6d199d3a5
commit
ae815fe009
@ -34,7 +34,8 @@ int firstReadAfterWrite = 0;
|
||||
*/
|
||||
|
||||
#ifdef SSCS_LINUX_PLAT_F
|
||||
int ipc_unx_create()
|
||||
void* ipc_unx_create()
|
||||
|
||||
{
|
||||
int retVal = 0;
|
||||
struct sockaddr_un servAddr;
|
||||
@ -63,7 +64,7 @@ int ipc_unx_create()
|
||||
else
|
||||
retVal = sockFd;
|
||||
}while(0);
|
||||
return retVal;
|
||||
return (void*)retVal;
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -42,6 +42,11 @@ typedef uint8_t Byte;
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void* ipc_unx_create(void);
|
||||
int ipc_unx_write(int fd, Byte *pData, int bytes);
|
||||
int ipc_unx_read(int fd, Byte *pData, int bytes);
|
||||
int ipc_unx_close(int fd);
|
||||
|
||||
#define IPC_CREATE(...) ipc_unx_create(__VA_ARGS__);
|
||||
#define IPC_READ(...) ipc_unx_read(__VA_ARGS__);
|
||||
#define IPC_WRITE(...) ipc_unx_write(__VA_ARGS__);
|
||||
|
Loading…
Reference in New Issue
Block a user