summaryrefslogtreecommitdiff
path: root/lang/modula-3-socks/files/bind.c
blob: d5cc51d56f64bfbae512d36fed0515c1318dd510 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "wrap.h"
#include <sys/types.h>
#include <sys/socket.h>

int
m3_bind(int s, const struct sockaddr *name, int namelen)
{
  int result;

  ENTER_CRITICAL;
  MAKE_READABLE(name);
  result = bind(s, name, namelen);
  EXIT_CRITICAL;
  return result;
}