diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2017-11-06 13:09:49 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2017-11-09 04:41:48 +0300 |
commit | fe252c19a9d7166451262bd327c6b51884f781ef (patch) | |
tree | 841f02cadb6a0015b7da59722798c4c0e63de6bb | |
parent | 661c9c2dbce4d412bebaf960ea6eb599318904a8 (diff) | |
download | ConsoleKit2-fe252c19a9d7166451262bd327c6b51884f781ef.tar.gz |
fix: Only use tmpfs mounts on DFly if supported
The vfs/tmpfs/tmpfs_mount.h file must be present on DragonFlyBSD
for tmpfs mounts to properly work.
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/ck-sysdeps-dragonfly.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index d7cda19..47f67ee 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,8 @@ AC_CHECK_HEADERS([unistd.h paths.h sys/vt.h sys/consio.h fcntl.h limits.h \ sys/sysmacros.h sys/types.h libudev.h linux/input.h \ sys/mkdev.h devattr.h sys/kd.h sys/kbio.h libprop/proplib.h \ linux/kd.h sys/queue.h sys/stat.h sys/fcntl.h \ - dev/wscons/wsdisplay_usl_io.h dev/wscons/wsconsio.h]) + dev/wscons/wsdisplay_usl_io.h dev/wscons/wsconsio.h \ + vfs/tmpfs/tmpfs_mount.h]) AC_CHECK_FUNCS([getpeerucred getpeereid memset setenv strchr strdup \ strerror strrchr strspn strstr strtol strtoul uname \ diff --git a/src/ck-sysdeps-dragonfly.c b/src/ck-sysdeps-dragonfly.c index 9f8e52f..79d1c4a 100644 --- a/src/ck-sysdeps-dragonfly.c +++ b/src/ck-sysdeps-dragonfly.c @@ -48,7 +48,10 @@ #ifdef HAVE_SYS_MOUNT_H #include <sys/mount.h> #endif + +#ifdef HAVE_VFS_TMPFS_TMPFS_MOUNT_H #include <vfs/tmpfs/tmpfs_mount.h> +#endif #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> @@ -498,7 +501,7 @@ ck_system_can_hybrid_sleep (void) gboolean ck_make_tmpfs (guint uid, guint gid, const gchar *dest) { -#ifdef HAVE_SYS_MOUNT_H +#ifdef HAVE_VFS_TMPFS_TMPFS_MOUNT_H int result; struct tmpfs_mount_info opts; TRACE (); @@ -528,7 +531,7 @@ ck_make_tmpfs (guint uid, guint gid, const gchar *dest) gboolean ck_remove_tmpfs (guint uid, const gchar *dest) { -#ifdef HAVE_SYS_MOUNT_H +#ifdef HAVE_VFS_TMPFS_TMPFS_MOUNT_H int result; TRACE (); |