]> git.sur5r.net Git - i3/i3/blobdiff - i3-config-wizard/main.c
Merge branch 'master' into next
[i3/i3] / i3-config-wizard / main.c
index 84a7f77ee22f3f76b688c89aed0e8d0c7cfa9a1b..ac59602403e455d3e3559f45bddbfb581bbaf856 100644 (file)
@@ -285,7 +285,7 @@ static void finish() {
 
     char *line = NULL;
     size_t len = 0;
-#if !defined(__APPLE__)
+#if !defined(__APPLE__) && (!defined(__FreeBSD__) || __FreeBSD_version >= 800000)
     ssize_t read;
 #endif
     bool head_of_file = true;
@@ -298,7 +298,7 @@ static void finish() {
     fputs("# this file and re-run i3-config-wizard(1).\n", ks_config);
     fputs("#\n", ks_config);
 
-#if defined(__APPLE__)
+#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 800000)
     while ((line = fgetln(kc_config, &len)) != NULL) {
 #else
     while ((read = getline(&line, &len, kc_config)) != -1) {
@@ -410,7 +410,7 @@ int main(int argc, char *argv[]) {
     unlink(config_path);
 
     if (socket_path == NULL)
-        socket_path = socket_path_from_x11();
+        socket_path = root_atom_contents("I3_SOCKET_PATH");
 
     if (socket_path == NULL)
         socket_path = "/tmp/i3-ipc.sock";