[libbluray-devel] Fix compilation error on FreeBSD

Frédéric Fauberteau git at videolan.org
Fri Mar 2 16:43:16 CET 2018


libbluray | branch: master | Frédéric Fauberteau <triaxx at NetBSD.org> | Fri Mar  2 13:10:43 2018 +0100| [ceccd357acc583d3b3d678e665f7705f32e9c9d6] | committer: Jean-Baptiste Kempf

Fix compilation error on FreeBSD

The compilation failed on FreeBSD 11.1 on file
src/util/time.c:58.

The /usr/include/sys/time.h of FreeBSD contains:
int getitimer(int, struct itimerval *);
int gettimeofday(struct timeval *, struct timezone *);

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ceccd357acc583d3b3d678e665f7705f32e9c9d6
---

 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index e5fba472..73437755 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,10 @@ case "${host_os}" in
     SYS=netbsd
     CFLAGS="${CFLAGS} -D_NETBSD_SOURCE"
     ;;
+  freebsd*)
+    SYS=freebsd
+    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE=700"
+    ;;
   *)
     SYS="${host_os}"
     ;;



More information about the libbluray-devel mailing list