~mmach/netext73/wasi-libc

« back to all changes in this revision

Viewing changes to libc-bottom-half/cloudlibc/src/libc/sys/socket/send.c

  • Committer: mmach
  • Date: 2023-09-12 15:53:36 UTC
  • Revision ID: netbit73@gmail.com-20230912155336-s1r5z5xnszz99zzo
0.0~git20230113.4362b18

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
//
3
3
// SPDX-License-Identifier: BSD-2-Clause
4
4
 
5
 
#include <common/errno.h>
6
 
 
7
5
#include <sys/socket.h>
8
6
 
9
7
#include <assert.h>
27
25
  size_t so_datalen;
28
26
  __wasi_errno_t error = __wasi_sock_send(socket, si_data, si_data_len, si_flags, &so_datalen);
29
27
  if (error != 0) {
30
 
    errno = errno_fixup_socket(socket, error);
 
28
    errno = error;
31
29
    return -1;
32
30
  }
33
31
  return so_datalen;