1*4882a593SmuzhiyunFrom cf37ba4c0bf31316b698ba23015f91903766871d Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Paul Cercueil <paul@crapouillou.net> 3*4882a593SmuzhiyunDate: Thu, 18 Feb 2021 22:31:39 +0000 4*4882a593SmuzhiyunSubject: [PATCH] Add feature macros to more C files 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunThese source files use "struct timespec", which is POSIX 1993.09. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunSigned-off-by: Paul Cercueil <paul@crapouillou.net> 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun[Retrieved from: https://github.com/swaywm/wlroots/pull/2493] 11*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 12*4882a593Smuzhiyun--- 13*4882a593Smuzhiyun backend/wayland/output.c | 1 + 14*4882a593Smuzhiyun types/data_device/wlr_data_device.c | 1 + 15*4882a593Smuzhiyun types/data_device/wlr_drag.c | 1 + 16*4882a593Smuzhiyun types/wlr_export_dmabuf_v1.c | 1 + 17*4882a593Smuzhiyun types/wlr_idle.c | 1 + 18*4882a593Smuzhiyun types/wlr_keyboard_shortcuts_inhibit_v1.c | 1 + 19*4882a593Smuzhiyun types/wlr_pointer_constraints_v1.c | 1 + 20*4882a593Smuzhiyun types/wlr_primary_selection.c | 1 + 21*4882a593Smuzhiyun types/wlr_relative_pointer_v1.c | 1 + 22*4882a593Smuzhiyun types/wlr_screencopy_v1.c | 1 + 23*4882a593Smuzhiyun types/wlr_virtual_pointer_v1.c | 1 + 24*4882a593Smuzhiyun types/wlr_xdg_decoration_v1.c | 1 + 25*4882a593Smuzhiyun types/xdg_shell/wlr_xdg_popup.c | 1 + 26*4882a593Smuzhiyun types/xdg_shell/wlr_xdg_positioner.c | 1 + 27*4882a593Smuzhiyun types/xdg_shell/wlr_xdg_shell.c | 1 + 28*4882a593Smuzhiyun types/xdg_shell/wlr_xdg_surface.c | 1 + 29*4882a593Smuzhiyun 16 files changed, 16 insertions(+) 30*4882a593Smuzhiyun 31*4882a593Smuzhiyundiff --git a/backend/wayland/output.c b/backend/wayland/output.c 32*4882a593Smuzhiyunindex d5410e0d32..8ff8fa2a00 100644 33*4882a593Smuzhiyun--- a/backend/wayland/output.c 34*4882a593Smuzhiyun+++ b/backend/wayland/output.c 35*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 36*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 37*4882a593Smuzhiyun #include <assert.h> 38*4882a593Smuzhiyun #include <stdint.h> 39*4882a593Smuzhiyun #include <stdio.h> 40*4882a593Smuzhiyundiff --git a/types/data_device/wlr_data_device.c b/types/data_device/wlr_data_device.c 41*4882a593Smuzhiyunindex 6cd84ec0ab..beac496124 100644 42*4882a593Smuzhiyun--- a/types/data_device/wlr_data_device.c 43*4882a593Smuzhiyun+++ b/types/data_device/wlr_data_device.c 44*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 45*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 46*4882a593Smuzhiyun #include <assert.h> 47*4882a593Smuzhiyun #include <stdlib.h> 48*4882a593Smuzhiyun #include <string.h> 49*4882a593Smuzhiyundiff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c 50*4882a593Smuzhiyunindex 53bf4066a1..e3c1e249b4 100644 51*4882a593Smuzhiyun--- a/types/data_device/wlr_drag.c 52*4882a593Smuzhiyun+++ b/types/data_device/wlr_drag.c 53*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 54*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 55*4882a593Smuzhiyun #include <assert.h> 56*4882a593Smuzhiyun #include <stdlib.h> 57*4882a593Smuzhiyun #include <string.h> 58*4882a593Smuzhiyundiff --git a/types/wlr_export_dmabuf_v1.c b/types/wlr_export_dmabuf_v1.c 59*4882a593Smuzhiyunindex a8e2a4bde3..98ceae68f1 100644 60*4882a593Smuzhiyun--- a/types/wlr_export_dmabuf_v1.c 61*4882a593Smuzhiyun+++ b/types/wlr_export_dmabuf_v1.c 62*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 63*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 64*4882a593Smuzhiyun #include <assert.h> 65*4882a593Smuzhiyun #include <stdlib.h> 66*4882a593Smuzhiyun #include <unistd.h> 67*4882a593Smuzhiyundiff --git a/types/wlr_idle.c b/types/wlr_idle.c 68*4882a593Smuzhiyunindex 4c338931cc..80fd871fab 100644 69*4882a593Smuzhiyun--- a/types/wlr_idle.c 70*4882a593Smuzhiyun+++ b/types/wlr_idle.c 71*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 72*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 73*4882a593Smuzhiyun #include <assert.h> 74*4882a593Smuzhiyun #include <stdlib.h> 75*4882a593Smuzhiyun #include <string.h> 76*4882a593Smuzhiyundiff --git a/types/wlr_keyboard_shortcuts_inhibit_v1.c b/types/wlr_keyboard_shortcuts_inhibit_v1.c 77*4882a593Smuzhiyunindex fe4e64b04e..8360a9c21c 100644 78*4882a593Smuzhiyun--- a/types/wlr_keyboard_shortcuts_inhibit_v1.c 79*4882a593Smuzhiyun+++ b/types/wlr_keyboard_shortcuts_inhibit_v1.c 80*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 81*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 82*4882a593Smuzhiyun #include <assert.h> 83*4882a593Smuzhiyun #include <stdlib.h> 84*4882a593Smuzhiyun #include <util/signal.h> 85*4882a593Smuzhiyundiff --git a/types/wlr_pointer_constraints_v1.c b/types/wlr_pointer_constraints_v1.c 86*4882a593Smuzhiyunindex eca45984c4..f1db8e3415 100644 87*4882a593Smuzhiyun--- a/types/wlr_pointer_constraints_v1.c 88*4882a593Smuzhiyun+++ b/types/wlr_pointer_constraints_v1.c 89*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 90*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 91*4882a593Smuzhiyun #include <assert.h> 92*4882a593Smuzhiyun #include <limits.h> 93*4882a593Smuzhiyun #include <pixman.h> 94*4882a593Smuzhiyundiff --git a/types/wlr_primary_selection.c b/types/wlr_primary_selection.c 95*4882a593Smuzhiyunindex 0875462c8c..7e0e11ddaa 100644 96*4882a593Smuzhiyun--- a/types/wlr_primary_selection.c 97*4882a593Smuzhiyun+++ b/types/wlr_primary_selection.c 98*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 99*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 100*4882a593Smuzhiyun #include <assert.h> 101*4882a593Smuzhiyun #include <stdlib.h> 102*4882a593Smuzhiyun #include <wlr/types/wlr_primary_selection.h> 103*4882a593Smuzhiyundiff --git a/types/wlr_relative_pointer_v1.c b/types/wlr_relative_pointer_v1.c 104*4882a593Smuzhiyunindex 8613f2b91c..3f8dd8b72a 100644 105*4882a593Smuzhiyun--- a/types/wlr_relative_pointer_v1.c 106*4882a593Smuzhiyun+++ b/types/wlr_relative_pointer_v1.c 107*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 108*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 109*4882a593Smuzhiyun #include <assert.h> 110*4882a593Smuzhiyun #include <inttypes.h> 111*4882a593Smuzhiyun #include <stdlib.h> 112*4882a593Smuzhiyundiff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c 113*4882a593Smuzhiyunindex 6feb074274..29864c2364 100644 114*4882a593Smuzhiyun--- a/types/wlr_screencopy_v1.c 115*4882a593Smuzhiyun+++ b/types/wlr_screencopy_v1.c 116*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 117*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 118*4882a593Smuzhiyun #include <assert.h> 119*4882a593Smuzhiyun #include <stdlib.h> 120*4882a593Smuzhiyun #include <drm_fourcc.h> 121*4882a593Smuzhiyundiff --git a/types/wlr_virtual_pointer_v1.c b/types/wlr_virtual_pointer_v1.c 122*4882a593Smuzhiyunindex a9d1fd7bc4..5566e9e013 100644 123*4882a593Smuzhiyun--- a/types/wlr_virtual_pointer_v1.c 124*4882a593Smuzhiyun+++ b/types/wlr_virtual_pointer_v1.c 125*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 126*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 127*4882a593Smuzhiyun #include <assert.h> 128*4882a593Smuzhiyun #include <stdlib.h> 129*4882a593Smuzhiyun #include <wlr/types/wlr_seat.h> 130*4882a593Smuzhiyundiff --git a/types/wlr_xdg_decoration_v1.c b/types/wlr_xdg_decoration_v1.c 131*4882a593Smuzhiyunindex 544035b7b8..904474c088 100644 132*4882a593Smuzhiyun--- a/types/wlr_xdg_decoration_v1.c 133*4882a593Smuzhiyun+++ b/types/wlr_xdg_decoration_v1.c 134*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 135*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 136*4882a593Smuzhiyun #include <assert.h> 137*4882a593Smuzhiyun #include <stdbool.h> 138*4882a593Smuzhiyun #include <stdlib.h> 139*4882a593Smuzhiyundiff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c 140*4882a593Smuzhiyunindex 69b4cfe19f..05d6551fc8 100644 141*4882a593Smuzhiyun--- a/types/xdg_shell/wlr_xdg_popup.c 142*4882a593Smuzhiyun+++ b/types/xdg_shell/wlr_xdg_popup.c 143*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 144*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 145*4882a593Smuzhiyun #include <assert.h> 146*4882a593Smuzhiyun #include <stdlib.h> 147*4882a593Smuzhiyun #include <string.h> 148*4882a593Smuzhiyundiff --git a/types/xdg_shell/wlr_xdg_positioner.c b/types/xdg_shell/wlr_xdg_positioner.c 149*4882a593Smuzhiyunindex f88bf323b8..8881c49916 100644 150*4882a593Smuzhiyun--- a/types/xdg_shell/wlr_xdg_positioner.c 151*4882a593Smuzhiyun+++ b/types/xdg_shell/wlr_xdg_positioner.c 152*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 153*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 154*4882a593Smuzhiyun #include <assert.h> 155*4882a593Smuzhiyun #include <stdlib.h> 156*4882a593Smuzhiyun #include "types/wlr_xdg_shell.h" 157*4882a593Smuzhiyundiff --git a/types/xdg_shell/wlr_xdg_shell.c b/types/xdg_shell/wlr_xdg_shell.c 158*4882a593Smuzhiyunindex 0480d5f354..c93fe7c3fb 100644 159*4882a593Smuzhiyun--- a/types/xdg_shell/wlr_xdg_shell.c 160*4882a593Smuzhiyun+++ b/types/xdg_shell/wlr_xdg_shell.c 161*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 162*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 163*4882a593Smuzhiyun #include <assert.h> 164*4882a593Smuzhiyun #include <stdlib.h> 165*4882a593Smuzhiyun #include "types/wlr_xdg_shell.h" 166*4882a593Smuzhiyundiff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c 167*4882a593Smuzhiyunindex edf562abcd..c1dfbfba7e 100644 168*4882a593Smuzhiyun--- a/types/xdg_shell/wlr_xdg_surface.c 169*4882a593Smuzhiyun+++ b/types/xdg_shell/wlr_xdg_surface.c 170*4882a593Smuzhiyun@@ -1,3 +1,4 @@ 171*4882a593Smuzhiyun+#define _POSIX_C_SOURCE 199309L 172*4882a593Smuzhiyun #include <assert.h> 173*4882a593Smuzhiyun #include <stdlib.h> 174*4882a593Smuzhiyun #include <string.h> 175