1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

Merge pull request #4864 from keszybz/build-sys

Fix some build issues and warnings
This commit is contained in:
Lennart Poettering 2016-12-11 20:12:32 +01:00 committed by GitHub
commit 4682047cf2
7 changed files with 21 additions and 26 deletions

View File

@ -918,18 +918,14 @@
must be passed as separate words). Lone semicolons may be escaped
as <literal>\;</literal>.</para>
<para>Each command line is split on whitespace, with the first
item being the command to execute, and the subsequent items being
the arguments. Double quotes ("...") and single quotes ('...') may
be used, in which case everything until the next matching quote
becomes part of the same argument. C-style escapes are also
supported. The table below contains the list of allowed escape
patterns. Only patterns which match the syntax in the table are
allowed; others will result in an error, and must be escaped by
doubling the backslash. Quotes themselves are removed after
parsing and escape sequences substituted. In addition, a trailing
backslash (<literal>\</literal>) may be used to merge lines.
</para>
<para>Each command line is split on whitespace, with the first item being the command to
execute, and the subsequent items being the arguments. Double quotes ("...") and single quotes
('...') may be used, in which case everything until the next matching quote becomes part of the
same argument. Quotes themselves are removed. C-style escapes are also supported. The table
below contains the list of known escape patterns. Only escape patterns which match the syntax in
the table are allowed; other patterns may be added in the future and unknown patterns will
result in a warning. In particular, any backslashes should be doubled. Finally, a trailing
backslash (<literal>\</literal>) may be used to merge lines.</para>
<para>This syntax is intended to be very similar to shell syntax,
but only the meta-characters and expansions described in the

View File

@ -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

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
@ -414,7 +409,6 @@ int dissect_image(int fd, const void *root_hash, size_t root_hash_size, Dissecte
architecture = SECONDARY_ARCHITECTURE;
rw = false;
}
#endif
#endif
else if (sd_id128_equal(type_id, GPT_SWAP)) {
designator = PARTITION_SWAP;

View File

@ -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>