Skip to content

Conversation

@Deepansharora27
Copy link

@Deepansharora27 Deepansharora27 commented Apr 29, 2022

I have made a draft PR for this and have made some inital changes

Fixes #284

@Deepansharora27 Deepansharora27 marked this pull request as draft April 29, 2022 10:48

int accept(int socket, struct sockaddr *restrict addr, socklen_t *restrict addrlen);
int accept4(int socket, struct sockaddr *restrict addr, socklen_t *restrict addrlen, int flags);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these need to be declared here, but not other socket APIs?

It looks like top-half/musl/include/sys/socket.h can be modified instead to declare these maybe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's admittedly confusing, and I forgot to mention it earlier, but even though wasi-libc doesn't use musl's bottom-half implementations, it does use musl's headers.

So the way to fix this is to move this #endif up two lines, to enable musl's accept declaration.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunfishcode So,Can I go ahead with making this change ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the Change

@haraldh
Copy link
Contributor

haraldh commented May 2, 2022

move to #287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for accept{,4}

4 participants