Skip to content

kdrive fails to build on musl libc due to undefined __uid_t and __gid_t #2162

@callmetango

Description

@callmetango

Select the version

25.1.3

Describe your issue

The build of hw/kdrive/linux/linux.c fails on musl libc due to:

xserver-xlibre-xserver-25.1.3/hw/kdrive/linux/linux.c: In function 'LinuxCheckChown':
xserver-xlibre-xserver-25.1.3/hw/kdrive/linux/linux.c:69:5: error: unknown type name '__uid_t'; did you mean 'uid_t'?
   69 |     __uid_t u;
      |     ^~~~~~~
      |     uid_t
xserver-xlibre-xserver-25.1.3/hw/kdrive/linux/linux.c:70:5: error: unknown type name '__gid_t'; did you mean 'gid_t'?
   70 |     __gid_t g;
      |     ^~~~~~~
      |     gid_t

It's caused by the usage of the GNUisms __uid_t and __gid_t, which are redefinitions of the POSIX-compatible uid_t and gid_t without any additional functionality.

Steps to reproduce

  1. Try to build xserver-xlibre-xserver-25.1.3 on a musl libc based system with xfbdev (kdrive) enabled
  2. Watch the build fail.

What did you expect?

The build is successful.

Additional Information

This bug has been fixed in 126eb37, but it needs to be fixed in the 25.1 release branch as well.

Extra fields

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions