Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD fixes #1232

Merged
merged 1 commit into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion common/log.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _POSIX_C_SOURCE 1
#define _POSIX_C_SOURCE 199506L
#include <errno.h>
#include <libgen.h>
#include <signal.h>
Expand Down
2 changes: 1 addition & 1 deletion common/stringop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion common/util.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion sway/border.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <wlc/wlc-render.h>
#include <cairo/cairo.h>
#include <pango/pangocairo.h>
Expand Down
2 changes: 1 addition & 1 deletion sway/commands.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-names.h>
#include <wlc/wlc.h>
Expand Down
3 changes: 1 addition & 2 deletions sway/commands/assign.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <string.h>
#include "sway/commands.h"
Expand Down Expand Up @@ -55,4 +55,3 @@ struct cmd_results *cmd_assign(int argc, char **argv) {
}
return error ? error : cmd_results_new(CMD_SUCCESS, NULL, NULL);
}

2 changes: 1 addition & 1 deletion sway/commands/set.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <string.h>
#include <strings.h>
Expand Down
4 changes: 2 additions & 2 deletions sway/config.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion sway/criteria.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
Expand Down
4 changes: 2 additions & 2 deletions sway/input.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <ctype.h>
#include <float.h>
#include <limits.h>
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions sway/main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200112L
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -433,4 +433,3 @@ int main(int argc, char **argv) {

return exit_value;
}

2 changes: 1 addition & 1 deletion sway/security.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion swaygrab/json.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
Expand Down
2 changes: 1 addition & 1 deletion swaygrab/main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 199309L
#include <stdio.h>
#include <stdbool.h>
Expand Down