diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-12-11 20:12:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-11 20:12:32 +0100 |
commit | 4682047cf23f3471894d83d847cdac6b3bec92e1 (patch) | |
tree | fe3b9c380d88d55ed55d1906ca178ef3803df23a /src | |
parent | 280b29ac84baee304c180fe64f820db56cd5b2b3 (diff) | |
parent | 330785f5caf426afa9d93e8eb7dcc7a72d7ea3cb (diff) | |
download | systemd-4682047cf23f3471894d83d847cdac6b3bec92e1.tar.gz systemd-4682047cf23f3471894d83d847cdac6b3bec92e1.tar.bz2 systemd-4682047cf23f3471894d83d847cdac6b3bec92e1.zip |
Merge pull request #4864 from keszybz/build-sys
Fix some build issues and warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/architecture.h | 1 | ||||
-rw-r--r-- | src/basic/extract-word.c | 4 | ||||
-rw-r--r-- | src/core/load-fragment.c | 3 | ||||
-rw-r--r-- | src/journal/compress.c | 4 | ||||
-rw-r--r-- | src/shared/dissect-image.c | 10 | ||||
-rw-r--r-- | src/shared/firewall-util.c | 5 |
6 files changed, 13 insertions, 14 deletions
diff --git a/src/basic/architecture.h b/src/basic/architecture.h index 5a77c31932..b329df2f6d 100644 --- a/src/basic/architecture.h +++ b/src/basic/architecture.h @@ -150,6 +150,7 @@ int uname_architecture(void); # else # define native_architecture() ARCHITECTURE_ARM64 # define LIB_ARCH_TUPLE "aarch64-linux-gnu" +# define SECONDARY_ARCHITECTURE ARCHITECTURE_ARM # endif #elif defined(__arm__) # if __BYTE_ORDER == __BIG_ENDIAN diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c index dbe64a9a58..f8cac3e911 100644 --- a/src/basic/extract-word.c +++ b/src/basic/extract-word.c @@ -227,8 +227,8 @@ int extract_first_word_and_warn( *p = save; r = extract_first_word(p, ret, separators, flags|EXTRACT_CUNESCAPE_RELAX); if (r >= 0) { - /* It worked this time, hence it must have been an invalid escape sequence we could correct. */ - log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Invalid escape sequences in line, correcting: \"%s\"", rvalue); + /* It worked this time, hence it must have been an invalid escape sequence. */ + log_syntax(unit, LOG_WARNING, filename, line, EINVAL, "Ignoring unknown escape sequences: \"%s\"", *ret); return r; } diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 6b36b2fc3a..687cd1dd31 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -606,7 +606,6 @@ int config_parse_exec( _cleanup_strv_free_ char **n = NULL; size_t nlen = 0, nbufsize = 0; const char *f; - int i; semicolon = false; @@ -615,7 +614,7 @@ int config_parse_exec( return 0; f = firstword; - for (i = 0; i < 3; i++) { + for (;;) { /* We accept an absolute path as first argument. * If it's prefixed with - and the path doesn't exist, * we ignore it instead of erroring out; diff --git a/src/journal/compress.c b/src/journal/compress.c index ba734b5561..818a720ba8 100644 --- a/src/journal/compress.c +++ b/src/journal/compress.c @@ -112,7 +112,11 @@ int compress_blob_lz4(const void *src, uint64_t src_size, if (src_size < 9) return -ENOBUFS; +#if LZ4_VERSION_NUMBER >= 10700 + r = LZ4_compress_default(src, (char*)dst + 8, src_size, (int) dst_alloc_size - 8); +#else r = LZ4_compress_limitedOutput(src, (char*)dst + 8, src_size, (int) dst_alloc_size - 8); +#endif if (r <= 0) return -ENOBUFS; diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 257af78781..d3ba9b9dde 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -372,9 +372,7 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte designator = PARTITION_ROOT; architecture = native_architecture(); rw = !(flags & GPT_FLAG_READ_ONLY); - } -#ifdef GPT_ROOT_NATIVE_VERITY - else if (sd_id128_equal(type_id, GPT_ROOT_NATIVE_VERITY)) { + } else if (sd_id128_equal(type_id, GPT_ROOT_NATIVE_VERITY)) { m->can_verity = true; @@ -388,7 +386,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte rw = false; } #endif -#endif #ifdef GPT_ROOT_SECONDARY else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY)) { @@ -399,9 +396,7 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte designator = PARTITION_ROOT_SECONDARY; architecture = SECONDARY_ARCHITECTURE; rw = !(flags & GPT_FLAG_READ_ONLY); - } -#ifdef GPT_ROOT_SECONDARY_VERITY - else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY_VERITY)) { + } else if (sd_id128_equal(type_id, GPT_ROOT_SECONDARY_VERITY)) { m->can_verity = true; @@ -415,7 +410,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte rw = false; } #endif -#endif else if (sd_id128_equal(type_id, GPT_SWAP)) { designator = PARTITION_SWAP; fstype = "swap"; diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c index f73108eaa3..9c29b0afca 100644 --- a/src/shared/firewall-util.c +++ b/src/shared/firewall-util.c @@ -17,8 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#warning "Temporary work-around for broken glibc vs. linux kernel header definitions" -#warning "This really should be removed sooner rather than later, when this is fixed upstream" +/* Temporary work-around for broken glibc vs. linux kernel header definitions + * This is already fixed upstream, remove this when distributions have updated. + */ #define _NET_IF_H 1 #include <alloca.h> |