Skip to content

shutdown () function causes undefined symbol error with 2.0.13 #13393

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
vargaz opened this issue Jan 30, 2021 · 1 comment · Fixed by #13399
Closed

shutdown () function causes undefined symbol error with 2.0.13 #13393

vargaz opened this issue Jan 30, 2021 · 1 comment · Fixed by #13399
Assignees

Comments

@vargaz
Copy link
Contributor

vargaz commented Jan 30, 2021

Testcase:

#include <sys/socket.h>

void main ()
{
	shutdown (0, 0);
}

To reproduce: emcc bug.c
Expected result: compiles
Actual result:

error: undefined symbol: __sys_shutdown (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: ___sys_shutdown may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors

Probably caused by: d7c7aed

sbc100 added a commit that referenced this issue Feb 1, 2021
We never really supported this syscall but prior to #13272 this
fact was not evident since the generic socketcall handler had a
catchall the returned ENOSYS.

Fixes: #13393
@sbc100
Copy link
Collaborator

sbc100 commented Feb 1, 2021

I don't think we ever actually had an implementation of this but #13399 should restore the previous behavior which is to return ENOSYS from shutdown.

sbc100 added a commit that referenced this issue Feb 2, 2021
We never really supported this syscall but prior to #13272 this
fact was not evident since the generic socketcall handler had a
catchall the returned ENOSYS.

Fixes: #13393
sbc100 added a commit that referenced this issue Feb 2, 2021
We never really supported this syscall but prior to #13272 this
fact was not evident since the generic socketcall handler had a
catchall the returned ENOSYS.

Fixes: #13393
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants