diff options
author | Micael Karlberg <[email protected]> | 2018-09-18 12:38:08 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 14:50:18 +0200 |
commit | 93ed18d0b5e46c9637ff50052e1d12a66d5d40e1 (patch) | |
tree | 187e735953ef6d9acf5dc1f21f103b8b5853739f /erts/emulator/nifs/common/socket_util.h | |
parent | 929ae46220f402d6f36072c46fe27ba39ad48d1b (diff) | |
download | otp-93ed18d0b5e46c9637ff50052e1d12a66d5d40e1.tar.gz otp-93ed18d0b5e46c9637ff50052e1d12a66d5d40e1.tar.bz2 otp-93ed18d0b5e46c9637ff50052e1d12a66d5d40e1.zip |
[socket-nif] Encoding of cmsg headers for sendmsg
Fixed various issues with regard to encode of CMsgHdrs
during sendmsg.
OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_util.h')
-rw-r--r-- | erts/emulator/nifs/common/socket_util.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/nifs/common/socket_util.h b/erts/emulator/nifs/common/socket_util.h index d0b3076df1..a38453e238 100644 --- a/erts/emulator/nifs/common/socket_util.h +++ b/erts/emulator/nifs/common/socket_util.h @@ -29,8 +29,15 @@ #include <erl_nif.h> #include "socket_int.h" -#define VOIDP(P) ((void*)P) -#define CHARP(P) ((char*)P) +#define CHAR(C) ((char) (C)) +#define UCHAR(C) ((unsigned char) (C)) +#define INT(I) ((int) (I)) +#define UINT(U) ((unsigned int) (U)) +#define LONG(L) ((long) (L)) +#define ULONG(L) ((unsigned long) (L)) +#define SZT(I) ((size_t) (I)) +#define VOIDP(P) ((void*) (P)) +#define CHARP(P) ((char*) (P)) #define ESOCK_ABORT(E) esock_abort(E, __func__, __FILE__, __LINE__) #define ESOCK_ASSERT(e) ((void) ((e) ? 1 : (ESOCK_ABORT(#e), 0))) |