#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>
#include "syscall.h"

int
bind(char *new, char *old, int flag)
{
	char *a, *s;
	Syscallmem *c;

	c = _getsyscallmem();
	s = (char*)(&c[1]);
	a = s;
	strcpy(a, new);
	c->arg[0] = a - s;
	a += strlen(a)+1;
	strcpy(a, old);
	c->arg[1] = a - s;
	c->arg[2] = flag;
	c->nr = Sbind;
	return _dosyscall(c);
}

