diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-17 16:14:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 16:14:35 +0200 |
commit | 46dafbf74a164fadf6de41c556d5cfc8a2fcee14 (patch) | |
tree | 70bcbb30dd628e463a462ab0adc8a9bbd3732fd0 | |
parent | Merge pull request #2861 from RyanDwyer/fix-empty-workspace-crashes (diff) | |
parent | Set sysconfdir to /etc only if prefix is /usr (diff) | |
download | sway-46dafbf74a164fadf6de41c556d5cfc8a2fcee14.tar.gz sway-46dafbf74a164fadf6de41c556d5cfc8a2fcee14.tar.zst sway-46dafbf74a164fadf6de41c556d5cfc8a2fcee14.zip |
Merge pull request #2864 from sghctoma/freebsd-fixes
FreeBSD fixes
-rw-r--r-- | common/loop.c | 2 | ||||
-rw-r--r-- | meson.build | 17 |
2 files changed, 16 insertions, 3 deletions
diff --git a/common/loop.c b/common/loop.c index 750bee75..82b80017 100644 --- a/common/loop.c +++ b/common/loop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #define _POSIX_C_SOURCE 199309L | 1 | #define _POSIX_C_SOURCE 200112L |
2 | #include <limits.h> | 2 | #include <limits.h> |
3 | #include <string.h> | 3 | #include <string.h> |
4 | #include <stdbool.h> | 4 | #include <stdbool.h> |
diff --git a/meson.build b/meson.build index 3fb1e81e..1e2b53fa 100644 --- a/meson.build +++ b/meson.build | |||
@@ -114,7 +114,13 @@ if scdoc.found() | |||
114 | endforeach | 114 | endforeach |
115 | endif | 115 | endif |
116 | 116 | ||
117 | add_project_arguments('-DSYSCONFDIR="/@0@"'.format(sysconfdir), language : 'c') | 117 | # If prefix is '/usr', sysconfdir will be explicitly set to '/etc' by Meson to |
118 | # enforce FHS compliance, so we should look for configs there as well. | ||
119 | if prefix == '/usr' | ||
120 | add_project_arguments('-DSYSCONFDIR="/@0@"'.format(sysconfdir), language : 'c') | ||
121 | else | ||
122 | add_project_arguments('-DSYSCONFDIR="/@0@/@1@"'.format(prefix, sysconfdir), language : 'c') | ||
123 | endif | ||
118 | 124 | ||
119 | version = get_option('sway-version') | 125 | version = get_option('sway-version') |
120 | if version != '' | 126 | if version != '' |
@@ -157,10 +163,17 @@ subdir('swaynag') | |||
157 | subdir('swaylock') | 163 | subdir('swaylock') |
158 | 164 | ||
159 | config = configuration_data() | 165 | config = configuration_data() |
160 | config.set('sysconfdir', sysconfdir) | ||
161 | config.set('datadir', join_paths(prefix, datadir)) | 166 | config.set('datadir', join_paths(prefix, datadir)) |
162 | config.set('prefix', prefix) | 167 | config.set('prefix', prefix) |
163 | 168 | ||
169 | # If prefix is '/usr', sysconfdir will be explicitly set to '/etc' by Meson to | ||
170 | # enforce FHS compliance, so we should look for configs there as well. | ||
171 | if prefix == '/usr' | ||
172 | config.set('sysconfdir', sysconfdir) | ||
173 | else | ||
174 | config.set('sysconfdir', join_paths(prefix, sysconfdir)) | ||
175 | endif | ||
176 | |||
164 | configure_file( | 177 | configure_file( |
165 | configuration: config, | 178 | configuration: config, |
166 | input: 'config.in', | 179 | input: 'config.in', |