diff options
Diffstat (limited to 'src/firejail/appimage.c')
-rw-r--r-- | src/firejail/appimage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/firejail/appimage.c b/src/firejail/appimage.c index 976750f8f..0f7ab40ff 100644 --- a/src/firejail/appimage.c +++ b/src/firejail/appimage.c | |||
@@ -31,17 +31,19 @@ | |||
31 | static char *devloop = NULL; // device file | 31 | static char *devloop = NULL; // device file |
32 | static char *mntdir = NULL; // mount point in /tmp directory | 32 | static char *mntdir = NULL; // mount point in /tmp directory |
33 | 33 | ||
34 | #ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h | ||
34 | static void err_loop(void) { | 35 | static void err_loop(void) { |
35 | fprintf(stderr, "Error: cannot configure loopback device\n"); | 36 | fprintf(stderr, "Error: cannot configure loopback device\n"); |
36 | exit(1); | 37 | exit(1); |
37 | } | 38 | } |
39 | #endif | ||
38 | 40 | ||
39 | void appimage_set(const char *appimage) { | 41 | void appimage_set(const char *appimage) { |
40 | assert(appimage); | 42 | assert(appimage); |
41 | assert(devloop == NULL); // don't call this twice! | 43 | assert(devloop == NULL); // don't call this twice! |
42 | EUID_ASSERT(); | 44 | EUID_ASSERT(); |
43 | 45 | ||
44 | #ifdef LOOP_CTL_GET_FREE // test for older kernels; this definition is found in /usr/include/linux/loop.h | 46 | #ifdef LOOP_CTL_GET_FREE |
45 | // check appimage file | 47 | // check appimage file |
46 | invalid_filename(appimage); | 48 | invalid_filename(appimage); |
47 | if (access(appimage, R_OK) == -1) { | 49 | if (access(appimage, R_OK) == -1) { |