]> git.mdlowis.com Git - proto/labwc.git/commit
Fix build on Alpine Linux
authorJohan Malm <jgm323@gmail.com>
Tue, 28 Dec 2021 15:06:33 +0000 (15:06 +0000)
committerJohan Malm <jgm323@gmail.com>
Tue, 28 Dec 2021 15:06:33 +0000 (15:06 +0000)
commit310c36c86d95c5e12bae26000a9583a4a5276bf7
tree046e08e0147670f2c3c603716effdc482942be83
parent09949e6fafde4a2b5429fe0c754e64c0bcb48adf
Fix build on Alpine Linux

Issue #144

Add `#define _POSIX_C_SOURCE 200809L` to avoid the error below:

../src/cursor.c: In function 'cursor_update_focus':
../src/cursor.c:271:2: warning: implicit declaration of function
'clock_gettime' [-Wimplicit-function-declaration]
  271 |  clock_gettime(CLOCK_MONOTONIC, &now);
      |  ^~~~~~~~~~~~~
../src/cursor.c:271:16: error: 'CLOCK_MONOTONIC' undeclared (first use in
this function)
  271 |  clock_gettime(CLOCK_MONOTONIC, &now);
      |                ^~~~~~~~~~~~~~~
../src/cursor.c:271:16: note: each undeclared identifier is reported only
once for each function it appears in
../src/cursor.c: In function 'is_double_click':
../src/cursor.c:486:16: error: 'CLOCK_MONOTONIC' undeclared (first use in
this function)
  486 |  clock_gettime(CLOCK_MONOTONIC, &now);
      |                ^~~~~~~~~~~~~~~
src/cursor.c