diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index c3a04f3..b9fe1bf 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -39,13 +39,15 @@ #endif #include -#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2) -/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */ -/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers): - Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define - PAGE_SIZE. It is defined in . */ -#include + +#ifdef __linux__ +# ifdef __GNU_LIBRARY__ +# if __GNU_LIBRARY__ < 2 /* libc5 */ +# include +# endif +# endif #endif + #include #include #include diff --git a/configure.ac b/configure.ac index b790012..4a5ede3 100644 --- a/configure.ac +++ b/configure.ac @@ -23,8 +23,10 @@ dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) AC_INIT([tinyx], 1.3) +AC_PREREQ([2.60]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) +AC_USE_SYSTEM_EXTENSIONS AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall]) dnl this gets generated by autoheader, and thus contains all the defines. we @@ -574,14 +576,6 @@ AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes]) dnl and the rest of these are generic, so they're in config.h AC_DEFINE(XResExtension, 1, [Build XRes extension]) -AC_TRY_COMPILE([ -#include -#ifndef __GLIBC__ -#error not glibc -#endif -], [], [AC_DEFINE(_GNU_SOURCE, 1, - [ Enable GNU and other extensions to the C environment for glibc])]) - dnl ---------- Compiler arguments AX_CHECK_COMPILE_FLAG([-flto], diff --git a/kdrive/linux/linux.c b/kdrive/linux/linux.c index 7a589cd..ad61310 100644 --- a/kdrive/linux/linux.c +++ b/kdrive/linux/linux.c @@ -34,6 +34,12 @@ #include #include +/* These symbols are not defined on musl */ +#if !defined(__uid_t) && !defined(__gid_t) +#define __uid_t uid_t +#define __gid_t gid_t +#endif + static int vtno; int LinuxConsoleFd; static int LinuxApmFd;