170 lines
5.8 KiB
Diff
170 lines
5.8 KiB
Diff
From 7de313d14588c467a47505919cc600bced5f7f47 Mon Sep 17 00:00:00 2001
|
|
From: Paul Cercueil <paul@crapouillou.net>
|
|
Date: Thu, 18 Feb 2021 22:31:39 +0000
|
|
Subject: [PATCH 1/5] Add feature macros to more C files
|
|
|
|
These source files use "struct timespec", which is POSIX 1993.09.
|
|
|
|
Upstream: Rejected (Upstream does not want these workarounds)
|
|
see: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2493
|
|
|
|
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
|
|
[Retrieved from: https://github.com/swaywm/wlroots/pull/2493]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
backend/wayland/output.c | 1 +
|
|
types/data_device/wlr_data_device.c | 1 +
|
|
types/data_device/wlr_drag.c | 1 +
|
|
types/wlr_export_dmabuf_v1.c | 1 +
|
|
types/wlr_keyboard_shortcuts_inhibit_v1.c | 1 +
|
|
types/wlr_pointer_constraints_v1.c | 1 +
|
|
types/wlr_primary_selection.c | 1 +
|
|
types/wlr_relative_pointer_v1.c | 1 +
|
|
types/wlr_screencopy_v1.c | 1 +
|
|
types/wlr_virtual_pointer_v1.c | 1 +
|
|
types/wlr_xdg_decoration_v1.c | 1 +
|
|
types/xdg_shell/wlr_xdg_popup.c | 1 +
|
|
types/xdg_shell/wlr_xdg_positioner.c | 1 +
|
|
types/xdg_shell/wlr_xdg_shell.c | 1 +
|
|
types/xdg_shell/wlr_xdg_surface.c | 1 +
|
|
15 files changed, 15 insertions(+)
|
|
|
|
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
|
|
index bc15084..608e0c8 100644
|
|
--- a/backend/wayland/output.c
|
|
+++ b/backend/wayland/output.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
diff --git a/types/data_device/wlr_data_device.c b/types/data_device/wlr_data_device.c
|
|
index 3b5b8a6..d482a0a 100644
|
|
--- a/types/data_device/wlr_data_device.c
|
|
+++ b/types/data_device/wlr_data_device.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c
|
|
index c6e9e59..17c8366 100644
|
|
--- a/types/data_device/wlr_drag.c
|
|
+++ b/types/data_device/wlr_drag.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
diff --git a/types/wlr_export_dmabuf_v1.c b/types/wlr_export_dmabuf_v1.c
|
|
index 69245e3..d2fc574 100644
|
|
--- a/types/wlr_export_dmabuf_v1.c
|
|
+++ b/types/wlr_export_dmabuf_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
diff --git a/types/wlr_keyboard_shortcuts_inhibit_v1.c b/types/wlr_keyboard_shortcuts_inhibit_v1.c
|
|
index 0e43556..f6e1742 100644
|
|
--- a/types/wlr_keyboard_shortcuts_inhibit_v1.c
|
|
+++ b/types/wlr_keyboard_shortcuts_inhibit_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <wlr/types/wlr_compositor.h>
|
|
diff --git a/types/wlr_pointer_constraints_v1.c b/types/wlr_pointer_constraints_v1.c
|
|
index 9f4bb2e..1894808 100644
|
|
--- a/types/wlr_pointer_constraints_v1.c
|
|
+++ b/types/wlr_pointer_constraints_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <limits.h>
|
|
#include <pixman.h>
|
|
diff --git a/types/wlr_primary_selection.c b/types/wlr_primary_selection.c
|
|
index e3212d6..d4687b8 100644
|
|
--- a/types/wlr_primary_selection.c
|
|
+++ b/types/wlr_primary_selection.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <wlr/types/wlr_primary_selection.h>
|
|
diff --git a/types/wlr_relative_pointer_v1.c b/types/wlr_relative_pointer_v1.c
|
|
index 94fb155..6ac846e 100644
|
|
--- a/types/wlr_relative_pointer_v1.c
|
|
+++ b/types/wlr_relative_pointer_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <inttypes.h>
|
|
#include <stdlib.h>
|
|
diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c
|
|
index 99ed769..a1ba1cc 100644
|
|
--- a/types/wlr_screencopy_v1.c
|
|
+++ b/types/wlr_screencopy_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <drm_fourcc.h>
|
|
diff --git a/types/wlr_virtual_pointer_v1.c b/types/wlr_virtual_pointer_v1.c
|
|
index 6fcd0e9..8e34b6c 100644
|
|
--- a/types/wlr_virtual_pointer_v1.c
|
|
+++ b/types/wlr_virtual_pointer_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <wlr/interfaces/wlr_pointer.h>
|
|
diff --git a/types/wlr_xdg_decoration_v1.c b/types/wlr_xdg_decoration_v1.c
|
|
index 0cc8f6d..d1435d3 100644
|
|
--- a/types/wlr_xdg_decoration_v1.c
|
|
+++ b/types/wlr_xdg_decoration_v1.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
diff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c
|
|
index e803587..75cef53 100644
|
|
--- a/types/xdg_shell/wlr_xdg_popup.c
|
|
+++ b/types/xdg_shell/wlr_xdg_popup.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
diff --git a/types/xdg_shell/wlr_xdg_positioner.c b/types/xdg_shell/wlr_xdg_positioner.c
|
|
index 6a991bb..dae879b 100644
|
|
--- a/types/xdg_shell/wlr_xdg_positioner.c
|
|
+++ b/types/xdg_shell/wlr_xdg_positioner.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <wlr/util/edges.h>
|
|
diff --git a/types/xdg_shell/wlr_xdg_shell.c b/types/xdg_shell/wlr_xdg_shell.c
|
|
index 33e99e3..194a535 100644
|
|
--- a/types/xdg_shell/wlr_xdg_shell.c
|
|
+++ b/types/xdg_shell/wlr_xdg_shell.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include "types/wlr_xdg_shell.h"
|
|
diff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c
|
|
index 28d5dba..9fddb7c 100644
|
|
--- a/types/xdg_shell/wlr_xdg_surface.c
|
|
+++ b/types/xdg_shell/wlr_xdg_surface.c
|
|
@@ -1,3 +1,4 @@
|
|
+#define _POSIX_C_SOURCE 199309L
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
--
|
|
2.20.1
|
|
|