mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
FreeBSD fixes
Increase _POSIX_SOURCE value where needed. Increase _XOPEN_SOURCE value where needed. Conditionally link to libcap (only on Linux). Possibly some trailing whitespace fixes (automatic).
This commit is contained in:
parent
5ed533a943
commit
7fef283044
|
@ -66,7 +66,10 @@ find_package(GdkPixbuf)
|
||||||
find_package(PAM)
|
find_package(PAM)
|
||||||
|
|
||||||
find_package(LibInput REQUIRED)
|
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)
|
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||||
find_package(EpollShim REQUIRED)
|
find_package(EpollShim REQUIRED)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _POSIX_C_SOURCE 1
|
#define _POSIX_C_SOURCE 199506L
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <wlc/wlc-render.h>
|
#include <wlc/wlc-render.h>
|
||||||
#include <cairo/cairo.h>
|
#include <cairo/cairo.h>
|
||||||
#include <pango/pangocairo.h>
|
#include <pango/pangocairo.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include <xkbcommon/xkbcommon-names.h>
|
#include <xkbcommon/xkbcommon-names.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#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);
|
return error ? error : cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#define _POSIX_C_SOURCE 200809L
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -527,7 +527,7 @@ bool load_main_config(const char *file, bool is_active) {
|
||||||
list_add(config->config_chain, path);
|
list_add(config->config_chain, path);
|
||||||
|
|
||||||
config->reading = true;
|
config->reading = true;
|
||||||
|
|
||||||
// Read security configs
|
// Read security configs
|
||||||
bool success = true;
|
bool success = true;
|
||||||
DIR *dir = opendir(SYSCONFDIR "/sway/security.d");
|
DIR *dir = opendir(SYSCONFDIR "/sway/security.d");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -60,7 +60,7 @@ char *libinput_dev_unique_id(struct libinput_device *device) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *fmt = "%d:%d:%s";
|
const char *fmt = "%d:%d:%s";
|
||||||
snprintf(identifier, len, fmt, vendor, product, name);
|
snprintf(identifier, len, fmt, vendor, product, name);
|
||||||
free(name);
|
free(name);
|
||||||
return identifier;
|
return identifier;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -433,4 +433,3 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
return exit_value;
|
return exit_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _XOPEN_SOURCE 700
|
||||||
#define _POSIX_C_SOURCE 199309L
|
#define _POSIX_C_SOURCE 199309L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
Loading…
Reference in a new issue