Fix compilation error for gettimeofday() on FreeBSD.

Use of gettimeofday() needs __XSI_VISIBLE (that implies _XOPEN_SOURCE
defined) on FreeBSD.
This commit is contained in:
triaxx 2018-03-02 11:59:26 +00:00
parent 3f772ab780
commit db6881399e
2 changed files with 19 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.10 2017/12/30 08:45:54 adam Exp $
$NetBSD: distinfo,v 1.11 2018/03/02 11:59:26 triaxx Exp $
SHA1 (libbluray-1.0.2.tar.bz2) = 025ef1c0a25b42f4a13a9fb2df09fc9cef1a821b
RMD160 (libbluray-1.0.2.tar.bz2) = 37ac4f42277f7feb79ee9b99c5d4870b1e4bfddf
SHA512 (libbluray-1.0.2.tar.bz2) = e1360ad08aa6cc67a80efa81a09004faebbe31105f1961494f82f655e3e7378b198ee3bc534b0d0c2bfec726939b11b545cc8bbfa30794fc647432dadf71089b
Size (libbluray-1.0.2.tar.bz2) = 733058 bytes
SHA1 (patch-configure) = 0f3c97ef54b780cd5227851b00a132e0ecb9a412

View file

@ -0,0 +1,17 @@
$NetBSD: patch-configure,v 1.1 2018/03/02 11:59:26 triaxx Exp $
Fix compilation error for gettimeofday() on FreeBSD.
--- configure.orig 2018-03-02 11:46:19.719512000 +0000
+++ configure
@@ -3298,6 +3298,10 @@ $as_echo "#define _WIN32_IE 0x0501" >>co
SYS=netbsd
CFLAGS="${CFLAGS} -D_NETBSD_SOURCE"
;;
+ freebsd*)
+ SYS=freebsd
+ CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=700"
+ ;;
*)
SYS="${host_os}"
;;