diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ed45830..edf486ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,10 @@ find_package(GdkPixbuf) find_package(PAM) find_package(LibInput REQUIRED) -find_package(Libcap REQUIRED) + +if (CMAKE_SYSTEM_NAME STREQUAL Linux) + find_package(Libcap REQUIRED) +endif (CMAKE_SYSTEM_NAME STREQUAL Linux) if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) find_package(EpollShim REQUIRED) diff --git a/common/log.c b/common/log.c index 61937495..af1bdc3f 100644 --- a/common/log.c +++ b/common/log.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 1 +#define _POSIX_C_SOURCE 199506L #include #include #include diff --git a/common/stringop.c b/common/stringop.c index 99e9636d..4a37543d 100644 --- a/common/stringop.c +++ b/common/stringop.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/common/util.c b/common/util.c index 34bb5ec1..d6369853 100644 --- a/common/util.c +++ b/common/util.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/sway/border.c b/sway/border.c index 10ad92c2..df0022ce 100644 --- a/sway/border.c +++ b/sway/border.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/sway/commands.c b/sway/commands.c index 509fd1a8..34218491 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/sway/commands/assign.c b/sway/commands/assign.c index ec262bb8..c3b03bbc 100644 --- a/sway/commands/assign.c +++ b/sway/commands/assign.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include "sway/commands.h" @@ -55,4 +55,3 @@ struct cmd_results *cmd_assign(int argc, char **argv) { } return error ? error : cmd_results_new(CMD_SUCCESS, NULL, NULL); } - diff --git a/sway/commands/set.c b/sway/commands/set.c index 1d6bce04..e3d08dd3 100644 --- a/sway/commands/set.c +++ b/sway/commands/set.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/sway/config.c b/sway/config.c index 19b1882f..85823953 100644 --- a/sway/config.c +++ b/sway/config.c @@ -1,5 +1,5 @@ #define _POSIX_C_SOURCE 200809L -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include @@ -527,7 +527,7 @@ bool load_main_config(const char *file, bool is_active) { list_add(config->config_chain, path); config->reading = true; - + // Read security configs bool success = true; DIR *dir = opendir(SYSCONFDIR "/sway/security.d"); diff --git a/sway/criteria.c b/sway/criteria.c index 1ea8311e..04683f66 100644 --- a/sway/criteria.c +++ b/sway/criteria.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/sway/input.c b/sway/input.c index 4f1ef760..6263f79f 100644 --- a/sway/input.c +++ b/sway/input.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include @@ -60,7 +60,7 @@ char *libinput_dev_unique_id(struct libinput_device *device) { } const char *fmt = "%d:%d:%s"; - snprintf(identifier, len, fmt, vendor, product, name); + snprintf(identifier, len, fmt, vendor, product, name); free(name); return identifier; } diff --git a/sway/main.c b/sway/main.c index 819788b1..82375e0b 100644 --- a/sway/main.c +++ b/sway/main.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #define _POSIX_C_SOURCE 200112L #include #include @@ -433,4 +433,3 @@ int main(int argc, char **argv) { return exit_value; } - diff --git a/sway/security.c b/sway/security.c index 8eab6126..92de06c1 100644 --- a/sway/security.c +++ b/sway/security.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/swaygrab/json.c b/swaygrab/json.c index 563b8ba3..80dae299 100644 --- a/swaygrab/json.c +++ b/swaygrab/json.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include diff --git a/swaygrab/main.c b/swaygrab/main.c index f901d318..413de1fa 100644 --- a/swaygrab/main.c +++ b/swaygrab/main.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #define _POSIX_C_SOURCE 199309L #include #include