1 Fixes the config.h include error during build:
4 In file included from src/xprintidle-ng.c:36:
5 lib/time.h:28:3: error: #error "Please include config.h first."
6 28 | #error "Please include config.h first."
10 Introduced since gnulib upgrade:
11 * https://github.com/coreutils/gnulib/commit/8ad7bc6
12 * https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00088.html
13 * https://www.gnu.org/software/gnulib/manual/html_node/Source-changes.html
15 The last version of gnulib now checks that config.h is the first include
16 in every compilation unit.
18 This is not the case with the xprintidle-ng source code, so this patch
19 moves these `config.h` inclusions to be first.
22 src/time-format.c | 2 +-
23 src/xprintidle-ng.c | 2 +-
24 2 files changed, 2 insertions(+), 2 deletions(-)
26 diff --git a/src/time-format.c b/src/time-format.c
27 index 3a46749..4c0a4d2 100644
28 --- a/src/time-format.c
29 +++ b/src/time-format.c
31 // 51 Franklin Street, Fifth Floor
32 // Boston, MA 02110-1301, USA.
42 diff --git a/src/xprintidle-ng.c b/src/xprintidle-ng.c
43 index 5156adf..ca69b2d 100644
44 --- a/src/xprintidle-ng.c
45 +++ b/src/xprintidle-ng.c
47 // Eivind Magnus Hvidevold <hvidevold@gmail.com>.
48 // kpowersave is licensed under the GNU GPL, version 2 _only_.
52 #include <X11/extensions/dpms.h>
53 #include <X11/extensions/scrnsaver.h>