From f86f1daf9a6f143d003bcba8b16a737d6510f2e5 Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 16 Aug 2018 10:54:45 +0100 Subject: [PATCH] Fix build on FreeBSD --- backend/wayland/wl_seat.c | 2 +- examples/idle-inhibit.c | 4 ++++ examples/layer-shell.c | 2 +- examples/multi-pointer.c | 1 - examples/pointer.c | 1 - examples/rotation.c | 1 - examples/tablet.c | 3 +-- examples/touch.c | 1 - rootston/seat.c | 2 +- types/wlr_virtual_keyboard_v1.c | 2 +- 10 files changed, 9 insertions(+), 10 deletions(-) diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index 5163e804c..8fb4aa5f7 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _POSIX_C_SOURCE 200809L #include #include #include diff --git a/examples/idle-inhibit.c b/examples/idle-inhibit.c index 348892ab3..48c812e8d 100644 --- a/examples/idle-inhibit.c +++ b/examples/idle-inhibit.c @@ -8,7 +8,11 @@ #include "idle-inhibit-unstable-v1-client-protocol.h" #include "xdg-shell-client-protocol.h" +#ifdef __linux__ #include +#elif __FreeBSD__ +#include +#endif /** * Usage: idle-inhibit diff --git a/examples/layer-shell.c b/examples/layer-shell.c index 70ae21f0b..f56825c3d 100644 --- a/examples/layer-shell.c +++ b/examples/layer-shell.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 199309L +#define _POSIX_C_SOURCE 200112L #ifdef __linux__ #include #elif __FreeBSD__ diff --git a/examples/multi-pointer.c b/examples/multi-pointer.c index 586896493..958e90f65 100644 --- a/examples/multi-pointer.c +++ b/examples/multi-pointer.c @@ -1,5 +1,4 @@ #define _POSIX_C_SOURCE 200112L -#define _XOPEN_SOURCE 500 #include #include #include diff --git a/examples/pointer.c b/examples/pointer.c index e0f009b33..f0d9fb4bf 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -1,5 +1,4 @@ #define _POSIX_C_SOURCE 200112L -#define _XOPEN_SOURCE 500 #include #include #include diff --git a/examples/rotation.c b/examples/rotation.c index 2d2fb1794..add7f42f6 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -1,5 +1,4 @@ #define _POSIX_C_SOURCE 200112L -#define _XOPEN_SOURCE 500 #include #include #include diff --git a/examples/tablet.c b/examples/tablet.c index 4a27d0e1d..4817db4db 100644 --- a/examples/tablet.c +++ b/examples/tablet.c @@ -1,5 +1,4 @@ -#define _POSIX_C_SOURCE 200112L -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 600 #include #include #include diff --git a/examples/touch.c b/examples/touch.c index 9954cdbd5..ba5d1e34b 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -1,5 +1,4 @@ #define _POSIX_C_SOURCE 200112L -#define _XOPEN_SOURCE 500 #include #include #include diff --git a/rootston/seat.c b/rootston/seat.c index 27363d8ed..9010d6e31 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 199309L +#define _POSIX_C_SOURCE 200112L #include #include #include diff --git a/types/wlr_virtual_keyboard_v1.c b/types/wlr_virtual_keyboard_v1.c index cf7be0eef..bd9ecf2b6 100644 --- a/types/wlr_virtual_keyboard_v1.c +++ b/types/wlr_virtual_keyboard_v1.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 1 +#define _POSIX_C_SOURCE 199309L #include #include #include