From: Zbigniew Jędrzejewski-Szmek Date: Tue, 5 Dec 2017 11:13:17 +0000 (+0100) Subject: Merge pull request #7542 from yuwata/build-cleanup X-Git-Tag: v236~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3aa6a559040dda5f5db061d77ef5c5aaf3b33501;hp=ea55e886a8eee45275fdd58263b4a2fb45efd02b;p=thirdparty%2Fsystemd.git Merge pull request #7542 from yuwata/build-cleanup several build cleanups --- diff --git a/meson.build b/meson.build index e0e8178910f..edfa02afbb4 100644 --- a/meson.build +++ b/meson.build @@ -635,9 +635,9 @@ substs.set('TTY_GID', tty_gid) # Ensure provided GID argument is numeric, otherwise fallback to default assignment if get_option('users-gid') != '' - users_gid = get_option('users-gid').to_int() + users_gid = get_option('users-gid').to_int() else - users_gid = '-' + users_gid = '-' endif substs.set('USERS_GID', users_gid) diff --git a/src/core/execute.c b/src/core/execute.c index 59a8d60fe3e..62f8ca7731a 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -2146,6 +2146,7 @@ fail: return r; } +#if ENABLE_SMACK static int setup_smack( const ExecContext *context, const ExecCommand *command) { @@ -2176,6 +2177,7 @@ static int setup_smack( return 0; } +#endif static int compile_bind_mounts( const ExecContext *context, @@ -2733,7 +2735,7 @@ static int exec_child( int *exit_status) { _cleanup_strv_free_ char **our_env = NULL, **pass_env = NULL, **accum_env = NULL, **final_argv = NULL; - _cleanup_free_ char *mac_selinux_context_net = NULL, *home_buffer = NULL; + _cleanup_free_ char *home_buffer = NULL; _cleanup_free_ gid_t *supplementary_gids = NULL; const char *username = NULL, *groupname = NULL; const char *home = NULL, *shell = NULL; @@ -2744,6 +2746,7 @@ static int exec_child( needs_mount_namespace, /* Do we need to set up a mount namespace for this kernel? */ needs_ambient_hack; /* Do we need to apply the ambient capabilities hack? */ #if HAVE_SELINUX + _cleanup_free_ char *mac_selinux_context_net = NULL; bool use_selinux = false; #endif #if ENABLE_SMACK diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index aa722c304a0..0481293a50c 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -419,12 +419,14 @@ static int verify_esp( uint64_t *ret_pstart, uint64_t *ret_psize, sd_id128_t *ret_uuid) { - +#if HAVE_BLKID _cleanup_blkid_free_probe_ blkid_probe b = NULL; char t[DEV_NUM_PATH_MAX]; + const char *v; +#endif uint64_t pstart = 0, psize = 0; struct stat st, st2; - const char *v, *t2; + const char *t2; struct statfs sfs; sd_id128_t uuid = SD_ID128_NULL; uint32_t part = 0; @@ -479,6 +481,7 @@ static int verify_esp( if (detect_container() > 0 || geteuid() != 0) goto finish; +#if HAVE_BLKID xsprintf_dev_num_path(t, "block", st.st_dev); errno = 0; b = blkid_new_probe_from_filename(t); @@ -561,6 +564,7 @@ static int verify_esp( r = safe_atou64(v, &psize); if (r < 0) return log_error_errno(r, "Failed to parse PART_ENTRY_SIZE field."); +#endif finish: if (ret_part) diff --git a/src/test/meson.build b/src/test/meson.build index efaa259d763..327c2859e85 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -155,7 +155,8 @@ tests += [ [['src/test/test-async.c'], [], - []], + [], + '', 'timeout=120'], [['src/test/test-locale-util.c'], [],