diff options
| author | Michael Biebl <biebl@debian.org> | 2020-10-20 22:07:24 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-10-20 22:07:24 +0200 |
| commit | f2ddac4cbc895837ddcc55015fae112f9859cd0a (patch) | |
| tree | 774424baed3e65adb78c34e25874cf4e781ac005 /shared | |
| parent | aafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (diff) | |
New upstream version 1.27.91 upstream/1.27.91
Diffstat (limited to 'shared')
| -rw-r--r-- | shared/c-rbtree/src/c-rbtree.c | 14 | ||||
| -rw-r--r-- | shared/c-rbtree/src/c-rbtree.h | 8 | ||||
| -rw-r--r-- | shared/nm-glib-aux/nm-macros-internal.h | 8 | ||||
| -rw-r--r-- | shared/nm-version-macros.h | 2 | ||||
| -rw-r--r-- | shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h | 4 | ||||
| -rw-r--r-- | shared/systemd/src/basic/missing_syscall.h | 28 | ||||
| -rw-r--r-- | shared/systemd/src/basic/socket-util.c | 2 |
7 files changed, 51 insertions, 15 deletions
diff --git a/shared/c-rbtree/src/c-rbtree.c b/shared/c-rbtree/src/c-rbtree.c index aacdcc29..2f0e608f 100644 --- a/shared/c-rbtree/src/c-rbtree.c +++ b/shared/c-rbtree/src/c-rbtree.c @@ -31,15 +31,17 @@ #include "c-rbtree-private.h" /* - * We use alignas(8) to enforce 64bit alignment of structure fields. This is - * according to ISO-C11, so we rely on the compiler to implement this. However, - * at the same time we don't want to exceed native malloc() alignment on target - * platforms. Hence, we also verify against max_align_t. + * We use the lower 2 bits of CRBNode pointers to store flags. Make sure + * CRBNode is 4-byte aligned, so the lower 2 bits are actually unused. We also + * sometimes store a pointer to the root-node, so make sure this one is also 4 + * byte aligned. + * Note that there are actually some architectures where `max_align_t` is 4, so + * we do not have much wiggle-room to extend this flag-set. */ static_assert(alignof(CRBNode) <= alignof(max_align_t), "Invalid RBNode alignment"); -static_assert(alignof(CRBNode) >= 8, "Invalid CRBNode alignment"); +static_assert(alignof(CRBNode) >= 4, "Invalid CRBNode alignment"); static_assert(alignof(CRBTree) <= alignof(max_align_t), "Invalid RBTree alignment"); -static_assert(alignof(CRBTree) >= 8, "Invalid CRBTree alignment"); +static_assert(alignof(CRBTree) >= 4, "Invalid CRBTree alignment"); /** * c_rbnode_leftmost() - return leftmost child diff --git a/shared/c-rbtree/src/c-rbtree.h b/shared/c-rbtree/src/c-rbtree.h index cb33fcf7..a9bbce52 100644 --- a/shared/c-rbtree/src/c-rbtree.h +++ b/shared/c-rbtree/src/c-rbtree.h @@ -27,7 +27,6 @@ extern "C" { #endif #include <assert.h> -#include <stdalign.h> #include <stddef.h> typedef struct CRBNode CRBNode; @@ -36,8 +35,7 @@ typedef struct CRBTree CRBTree; /* implementation detail */ #define C_RBNODE_RED (0x1UL) #define C_RBNODE_ROOT (0x2UL) -#define C_RBNODE_UNUSED3 (0x4UL) -#define C_RBNODE_FLAG_MASK (0x7UL) +#define C_RBNODE_FLAG_MASK (0x3UL) /** * struct CRBNode - Node of a Red-Black Tree @@ -60,7 +58,7 @@ typedef struct CRBTree CRBTree; * C_RBNODE_INIT. */ struct CRBNode { - alignas(8) unsigned long __parent_and_flags; + unsigned long __parent_and_flags; CRBNode *left; CRBNode *right; }; @@ -90,7 +88,7 @@ void c_rbnode_unlink_stale(CRBNode *n); * To initialize an RB-Tree, set it to NULL / all zero. */ struct CRBTree { - alignas(8) CRBNode *root; + CRBNode *root; }; #define C_RBTREE_INIT {} diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index db1597fa..d495dd8e 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -709,7 +709,13 @@ NM_G_ERROR_MSG(GError *error) char *const*: (const char *const*) (value), \ char * *: (const char *const*) (value), \ const void *: (const char *const*) (value), \ - void *: (const char *const*) (value))) + void *: (const char *const*) (value), \ + const char *const*const: (const char *const*) (value), \ + const char * *const: (const char *const*) (value), \ + char *const*const: (const char *const*) (value), \ + char * *const: (const char *const*) (value), \ + const void *const: (const char *const*) (value), \ + void *const: (const char *const*) (value))) #else #define NM_CAST_STRV_MC(value) ((const char **) (value)) #define NM_CAST_STRV_CC(value) ((const char *const *) (value)) diff --git a/shared/nm-version-macros.h b/shared/nm-version-macros.h index 6ee83041..adadb4c0 100644 --- a/shared/nm-version-macros.h +++ b/shared/nm-version-macros.h @@ -30,7 +30,7 @@ * Evaluates to the micro version number of NetworkManager which this source * compiled against. */ -#define NM_MICRO_VERSION (90) +#define NM_MICRO_VERSION (91) /** * NM_CHECK_VERSION: diff --git a/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h b/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h index a937a889..0160284d 100644 --- a/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h +++ b/shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h @@ -140,6 +140,10 @@ NM_PRAGMA_WARNING_DISABLE("-Wdeclaration-after-statement") /*****************************************************************************/ +struct statx; + +/*****************************************************************************/ + static inline pid_t raw_getpid(void) { diff --git a/shared/systemd/src/basic/missing_syscall.h b/shared/systemd/src/basic/missing_syscall.h index 4aed6e7c..d11a77d5 100644 --- a/shared/systemd/src/basic/missing_syscall.h +++ b/shared/systemd/src/basic/missing_syscall.h @@ -632,8 +632,20 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, /* ======================================================================= */ /* should be always defined, see kernel 39036cd2727395c3369b1051005da74059a85317 */ -#if defined(__alpha__) +#if defined __alpha__ # define systemd_NR_pidfd_send_signal 534 +#elif defined _MIPS_SIM +# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ +# define systemd_NR_pidfd_send_signal (424 + 4000) +# endif +# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ +# define systemd_NR_pidfd_send_signal (424 + 6000) +# endif +# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ +# define systemd_NR_pidfd_send_signal (424 + 5000) +# endif +#elif defined __ia64__ +# define systemd_NR_pidfd_send_signal (424 + 1024) #else # define systemd_NR_pidfd_send_signal 424 #endif @@ -664,8 +676,20 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un #endif /* should be always defined, see kernel 7615d9e1780e26e0178c93c55b73309a5dc093d7 */ -#if defined(__alpha__) +#if defined __alpha__ # define systemd_NR_pidfd_open 544 +#elif defined _MIPS_SIM +# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ +# define systemd_NR_pidfd_open (434 + 4000) +# endif +# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ +# define systemd_NR_pidfd_open (434 + 6000) +# endif +# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ +# define systemd_NR_pidfd_open (434 + 5000) +# endif +#elif defined __ia64__ +# define systemd_NR_pidfd_open (434 + 1024) #else # define systemd_NR_pidfd_open 434 #endif diff --git a/shared/systemd/src/basic/socket-util.c b/shared/systemd/src/basic/socket-util.c index 01dce3ab..4d889e56 100644 --- a/shared/systemd/src/basic/socket-util.c +++ b/shared/systemd/src/basic/socket-util.c @@ -1217,6 +1217,7 @@ ssize_t recvmsg_safe(int sockfd, struct msghdr *msg, int flags) { return n; } +#if 0 /* NM_IGNORED */ int socket_get_family(int fd, int *ret) { int af; socklen_t sl = sizeof(af); @@ -1393,3 +1394,4 @@ int socket_set_transparent(int fd, int af, bool b) { return -EAFNOSUPPORT; } } +#endif /* NM_IGNORED */ |