Added syscall for g_fn.send() in UDP and UNIX/Edge cases in musl libc execs.
@@ -1303,7 +1303,12 @@ transportSend(transport_t *trans, const char *msg, size_t len)
switch (trans->type) {
case CFG_UDP:
if (trans->net.sock != -1) {
- int rc = g_fn.send(trans->net.sock, msg, len, 0);
+ int rc;
+ if (g_ismusl == TRUE) {
+ rc = g_fn.syscall(SYS_sendto, trans->net.sock, msg, len, 0, NULL, 0);
+ } else {
+ rc = g_fn.send(trans->net.sock, msg, len, 0);
+ }
if (rc < 0) {
switch (errno) {
@@ -1351,7 +1356,12 @@ transportSend(transport_t *trans, const char *msg, size_t len)
#ifdef __linux__
flags |= MSG_NOSIGNAL;
#endif
- int rc = g_fn.send(trans->local.sock, msg, len, flags);
+ int rc;
+ if (g_ismusl == TRUE) {
+ rc = g_fn.syscall(SYS_sendto, trans->net.sock, msg, len, flags, NULL, 0);
+ } else {
+ rc = g_fn.send(trans->local.sock, msg, len, flags);
+ }
if (rc < 0) {
switch (errno) {
