Skip to content

Commit

Permalink
Check for GNU user space instead of Linux kernel
Browse files Browse the repository at this point in the history
__linux__ checks only for Linux kernel, but this also is needed on other
kernels - instead check if we are running on GNU userspace (__GLIBC__)
which should work properly everywhere.
  • Loading branch information
gusnan authored and caclark committed Oct 13, 2024
1 parent 499c7b7 commit 4709e02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collect-io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <gdk/gdk.h>
#include <glib-object.h>

#if defined(__linux__)
#if defined(__GLIBC__)
#include <mntent.h>
#else
#include <sys/mount.h>
Expand Down Expand Up @@ -265,7 +265,7 @@ static gboolean collection_load_private(CollectionData *cd, const gchar *path, C
if (!g_str_has_prefix(buffer2, "/home") && !g_str_has_prefix(buffer2, "/tmp") && !g_str_has_prefix(buffer2, "/usr"))
{
/* The file was on a mounted drive and either has been deleted or the drive is not mounted */
#if defined(__linux__)
#if defined(__GLIBC__)
struct mntent *mount_entry;
FILE *mount_entries;

Expand Down

0 comments on commit 4709e02

Please sign in to comment.