fix build on musl, require automake 2.60
This commit is contained in:
parent
fad566e010
commit
85e8af0e0d
@ -39,13 +39,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2)
|
|
||||||
/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */
|
#ifdef __linux__
|
||||||
/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers):
|
# ifdef __GNU_LIBRARY__
|
||||||
Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define
|
# if __GNU_LIBRARY__ < 2 /* libc5 */
|
||||||
PAGE_SIZE. It is defined in <asm/page.h>. */
|
# include <asm/page.h>
|
||||||
#include <asm/page.h>
|
# endif
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
10
configure.ac
10
configure.ac
@ -23,8 +23,10 @@ dnl Process this file with autoconf to create configure.
|
|||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_INIT([tinyx], 1.3)
|
AC_INIT([tinyx], 1.3)
|
||||||
|
AC_PREREQ([2.60])
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
|
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
|
||||||
|
|
||||||
dnl this gets generated by autoheader, and thus contains all the defines. we
|
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
|
dnl and the rest of these are generic, so they're in config.h
|
||||||
AC_DEFINE(XResExtension, 1, [Build XRes extension])
|
AC_DEFINE(XResExtension, 1, [Build XRes extension])
|
||||||
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <features.h>
|
|
||||||
#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
|
dnl ---------- Compiler arguments
|
||||||
|
|
||||||
AX_CHECK_COMPILE_FLAG([-flto],
|
AX_CHECK_COMPILE_FLAG([-flto],
|
||||||
|
@ -34,6 +34,12 @@
|
|||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <linux/apm_bios.h>
|
#include <linux/apm_bios.h>
|
||||||
|
|
||||||
|
/* 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;
|
static int vtno;
|
||||||
int LinuxConsoleFd;
|
int LinuxConsoleFd;
|
||||||
static int LinuxApmFd;
|
static int LinuxApmFd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user