static uae_u32 REGPARAM2 bsdsocklib_shutdown (TrapContext *ctx)
{
struct socketbase *sb = get_socketbase (ctx);
+#ifndef _WIN32
+ sb->context = ctx;
+#endif
return host_shutdown (sb, trap_get_dreg(ctx, 0), trap_get_dreg(ctx, 1));
}
static uae_u32 REGPARAM2 bsdsocklib_setsockopt (TrapContext *ctx)
{
struct socketbase *sb = get_socketbase (ctx);
+#ifndef _WIN32
+ sb->context = ctx;
+#endif
host_setsockopt (sb, trap_get_dreg(ctx, 0), trap_get_dreg(ctx, 1), trap_get_dreg(ctx, 2),
trap_get_areg(ctx, 0), trap_get_dreg(ctx, 3));
return sb->resultval;
uae_u32 host_shutdown(SB, uae_u32 sd, uae_u32 how)
{
- TrapContext *ctx = NULL;
+ TrapContext *ctx = sb->context;
SOCKET s;
write_log("shutdown(%d,%d) -> ", sd, how);
void host_setsockopt(SB, uae_u32 sd, uae_u32 level, uae_u32 optname, uae_u32 optval, uae_u32 len)
{
- TrapContext* ctx = NULL;
+ TrapContext* ctx = sb->context;
int s = getsock(ctx, sb, sd + 1);
void* buf = NULL;
struct linger sl;
sb->sets [2] = exceptfds;
sb->timeout = timeout;
sb->sigmp = wssigs;
+ sb->context = ctx;
sb->action = 5;
uae_sem_post (&sb->sem);