mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
systemd: workaround compilation failures against old glibc
Building against older libc/kernel headers can fail, because our glue code for systemd has issues. Fix them by forward declaring "struct statx" and by disabling parts of "socket-util.c".
This commit is contained in:
parent
5e83bac5aa
commit
b7e08f685d
2 changed files with 6 additions and 0 deletions
|
|
@ -140,6 +140,10 @@ NM_PRAGMA_WARNING_DISABLE("-Wdeclaration-after-statement")
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
struct statx;
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static inline pid_t
|
static inline pid_t
|
||||||
raw_getpid(void)
|
raw_getpid(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1217,6 +1217,7 @@ ssize_t recvmsg_safe(int sockfd, struct msghdr *msg, int flags) {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* NM_IGNORED */
|
||||||
int socket_get_family(int fd, int *ret) {
|
int socket_get_family(int fd, int *ret) {
|
||||||
int af;
|
int af;
|
||||||
socklen_t sl = sizeof(af);
|
socklen_t sl = sizeof(af);
|
||||||
|
|
@ -1393,3 +1394,4 @@ int socket_set_transparent(int fd, int af, bool b) {
|
||||||
return -EAFNOSUPPORT;
|
return -EAFNOSUPPORT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* NM_IGNORED */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue