From fa587b8ea95153fb1313012cb7b76b05b4f97ab5 Mon Sep 17 00:00:00 2001 From: sghctoma Date: Wed, 17 Oct 2018 08:33:19 +0200 Subject: [PATCH 1/2] Increase _POSIX_C_SOURCE to 200112L CLOCK_MONOTONIC appeared in IEEE Std. 1003.1-200x, it was not part of POSIX.1b (the 1993 version), and FreeBSD treats it accordingly. --- backend/drm/drm.c | 2 +- backend/multi/backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1313e7fe..0b624717 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 199309L +#define _POSIX_C_SOURCE 200112L #include #include #include diff --git a/backend/multi/backend.c b/backend/multi/backend.c index cefaa361..50851109 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 199309L +#define _POSIX_C_SOURCE 200112L #include #include #include From 1d7cc1b38b0ebff87082f0fbb6b1354a68285295 Mon Sep 17 00:00:00 2001 From: sghctoma Date: Wed, 17 Oct 2018 10:55:53 +0200 Subject: [PATCH 2/2] Add epoll-shim dependency on FreeBSD On FreeBSD, epoll is provided as a 3rd-party library, so it needs to be added as a dependency. --- examples/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/meson.build b/examples/meson.build index 13985e27..369c7049 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -6,6 +6,13 @@ libavutil = dependency('libavutil', version: '>=56.14.100', required: false) libavcodec = dependency('libavcodec', version: '>=58.18.100', required: false) libavformat = dependency('libavformat', version: '>=58.12.100', required: false) +# epoll is a separate library in FreeBSD +if host_machine.system() == 'freebsd' + libepoll = [dependency('epoll-shim')] +else + libepoll = [] +endif + # Small hack until https://github.com/mesonbuild/meson/pull/3386/ is merged foreach dep : ['libpng', 'libavutil', 'libavcodec', 'libavformat'] if not get_variable(dep).found() @@ -97,7 +104,7 @@ examples = { }, 'input-method': { 'src': 'input-method.c', - 'dep': [wayland_client, wlr_protos, wlroots], + 'dep': [wayland_client, wlr_protos, wlroots] + libepoll, }, 'text-input': { 'src': 'text-input.c',