Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 565
    • Issues 565
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 93
    • Merge requests 93
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Issues
  • #544
Closed
Open
Issue created Sep 19, 2018 by Petr Menšík@pemensikContributor

IRS_GETNAMEINFO_BUFLEN_T detection differs depending on architecture

In braches v9_11 and v9_12, IRS_GETNAMEINFO_BUFLEN_T detection in configure generates different result on the same code. This causes multilib issues. It does not allow installation of the headers both for i686 and x86_64 on the same machine for example.

Our issue on Fedora with glibc glibc-2.27 is with getnameinfo signature:

int getnameinfo(const struct sockaddr *addr, socklen_t addrlen,
                       char *host, socklen_t hostlen,
                       char *serv, socklen_t servlen, int flags);

This signature is not detected directly, but only detected as fallback. This causes the issue, because on 32-bit architectures, socklen_t is compatible with size_t, but on 64-bit architectures it is not. On 32-bit architecture, size_t is detected for IRS_GETNAMEINFO_BUFLEN_T, because it matches first.

int getnameinfo(const struct sockaddr *, socklen_t, char *,
                size_t, char *, size_t, int);

On 64-bit architecture, it has to use the fallback socklen_t.

Suggested fix is to test socklen_t types with int flags before trying size_t. The change back from unsigned int seems to be pretty old. I am aware this is already fixed in 9.13 and master.

Assignee
Assign to
Time tracking