packages/net/coova-chilli/patches/500-redir.patch
Rosen Penev 9f531cecd5
coova-chili: Fix compilation with newer GCC
Added -Wno-error to fix.

Also added patch to fix compilation without deprecated OpenSSL APIs.

Added PKG_BUILD_PARALLEL for faster compilation.

Switched libcyassl to libwolfssl.

Reorganized makefile for consistency between packages.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from 266b0ba9d9)
2019-07-19 20:08:29 -07:00

44 lines
2.3 KiB
Diff

--- a/src/redir.c
+++ b/src/redir.c
@@ -3358,14 +3358,17 @@ int redir_main(struct redir_t *redir,
}
#define redir_memcopy(msgtype) \
+ do { \
redir_challenge(challenge); \
redir_chartohex(challenge, hexchal, REDIR_MD5LEN); \
msg.mtype = msgtype; \
memcpy(conn.s_state.redir.uamchal, challenge, REDIR_MD5LEN); \
- if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal)
+ if (_options.debug) syslog(LOG_DEBUG, "%s(%d): ---->>> resetting challenge: %s", __FUNCTION__, __LINE__, hexchal); \
+ } while (0)
#ifdef USING_IPC_UNIX
#define redir_msg_send(msgopt) \
+ do { \
msg.mdata.opt = msgopt; \
memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address)); \
memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress)); \
@@ -3375,9 +3378,11 @@ int redir_main(struct redir_t *redir,
syslog(LOG_ERR, "%s: write() failed! msgfd=%d type=%ld len=%d", \
strerror(errno), redir->msgfd, msg.mtype, (int)sizeof(msg.mdata)); \
return redir_main_exit(&socket, forked, rreq); \
- }
+ } \
+ } while (0)
#else
#define redir_msg_send(msgopt) \
+ do { \
msg.mdata.opt = msgopt; \
memcpy(&msg.mdata.address, address, sizeof(msg.mdata.address)); \
memcpy(&msg.mdata.baddress, baddress, sizeof(msg.mdata.baddress)); \
@@ -3387,7 +3392,8 @@ int redir_main(struct redir_t *redir,
syslog(LOG_ERR, "%s: msgsnd() failed! msgid=%d type=%ld len=%d", \
strerror(errno), redir->msgid, msg.mtype, (int)sizeof(msg.mdata)); \
return redir_main_exit(&socket, forked, rreq); \
- }
+ } \
+ } while (0)
#endif
/*