Skip to content

getpeername/getnameinfo not detected by configure test #9154

Description

@Beuc

Hi,

While compiling Python's _socket module, I noticed that getpeername and getnameinfo were mistakenly detected as not present.

Something appears to confuse emscripten in the configuration test, as it returns a link error with htons:

$ emcc -o conftest    conftest.c -ldl
warning: unexpected number of arguments 0 in call to 'getpeername', should be 3
error: undefined symbol: htons
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
Error: Aborting compilation due to previous errors

(using -s ERROR_ON_UNDEFINED_SYMBOLS=0 as suggested would defeat the point of the config test :))

The behavior is triggered by using conftest.c as a file name.
It happens even without all the autoconf boilerplate.

See testcases attached.
conftests.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions