mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Fix build of bsdiff-4.3 on machines that don't have <err.h>, such as Solaris.
This commit is contained in:
parent
d63375d529
commit
af09fe12dd
3 changed files with 17 additions and 1 deletions
|
@ -136,6 +136,10 @@ AC_CHECK_HEADERS([locale], [], [], [])
|
||||||
AC_LANG_POP(C++)
|
AC_LANG_POP(C++)
|
||||||
|
|
||||||
|
|
||||||
|
# Check for <err.h>.
|
||||||
|
AC_CHECK_HEADER([err.h], [], [bsddiff_compat_include="-Icompat-include"])
|
||||||
|
AC_SUBST([bsddiff_compat_include])
|
||||||
|
|
||||||
# Check whether we have the personality() syscall, which allows us to
|
# Check whether we have the personality() syscall, which allows us to
|
||||||
# do i686-linux builds on x86_64-linux machines.
|
# do i686-linux builds on x86_64-linux machines.
|
||||||
AC_CHECK_HEADERS([sys/personality.h])
|
AC_CHECK_HEADERS([sys/personality.h])
|
||||||
|
|
|
@ -8,4 +8,4 @@ bspatch_SOURCES = bspatch.c
|
||||||
|
|
||||||
bspatch_LDADD = ${bzip2_lib}
|
bspatch_LDADD = ${bzip2_lib}
|
||||||
|
|
||||||
AM_CFLAGS = -O3 ${bzip2_include}
|
AM_CFLAGS = -O3 ${bzip2_include} ${bsddiff_compat_include}
|
||||||
|
|
12
src/bsdiff-4.3/compat-include/err.h
Normal file
12
src/bsdiff-4.3/compat-include/err.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* Simulate BSD's <err.h> functionality. */
|
||||||
|
|
||||||
|
#ifndef COMPAT_ERR_H_INCLUDED
|
||||||
|
#define COMPAT_ERR_H_INCLUDED 1
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define err(rc,...) do { fprintf(stderr,__VA_ARGS__); exit(rc); } while(0)
|
||||||
|
#define errx(rc,...) do { fprintf(stderr,__VA_ARGS__); exit(rc); } while(0)
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue