aboutsummaryrefslogtreecommitdiff
path: root/backend/session/session.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-11 08:54:28 -0400
committerGitHub <noreply@github.com>2017-10-11 08:54:28 -0400
commitbf5299a3a55040d8593c87d02bec364784c2c911 (patch)
tree690fe47fe25765394a13b2eb60f6870cc483a707 /backend/session/session.c
parentf7bcb2750b4756ed2b5231a8a2831f26ab6d93ef (diff)
parenta5fe9aa73633594b443e2a1a990cdf23addbb28b (diff)
Merge pull request #252 from myfreeweb/freebsd-compat
Add FreeBSD compatibility
Diffstat (limited to 'backend/session/session.c')
-rw-r--r--backend/session/session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/session/session.c b/backend/session/session.c
index b73952fd..b14ca4d0 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -263,6 +263,11 @@ size_t wlr_session_find_gpus(struct wlr_session *session,
return explicit_find_gpus(session, ret_len, ret, explicit);
}
+#ifdef __FreeBSD__
+ // XXX: libudev-devd does not return any GPUs (yet?)
+ return explicit_find_gpus(session, ret_len, ret, "/dev/drm/0");
+#else
+
struct udev_enumerate *en = udev_enumerate_new(session->udev);
if (!en) {
wlr_log(L_ERROR, "Failed to create udev enumeration");
@@ -329,4 +334,5 @@ size_t wlr_session_find_gpus(struct wlr_session *session,
udev_enumerate_unref(en);
return i;
+#endif
}