chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: add support for delayed shutdown, similar to sysv in style
[elogind.git]
/
src
/
socket-util.h
diff --git
a/src/socket-util.h
b/src/socket-util.h
index 86c9e47809c51a7f2725b6f37cbf857d19f45fd9..b5cb2a844d977fdfb7eed87bcf1d1c762d231ae7 100644
(file)
--- a/
src/socket-util.h
+++ b/
src/socket-util.h
@@
-30,14
+30,16
@@
#include "macro.h"
#include "util.h"
#include "macro.h"
#include "util.h"
+union sockaddr_union {
+ struct sockaddr sa;
+ struct sockaddr_in in4;
+ struct sockaddr_in6 in6;
+ struct sockaddr_un un;
+ struct sockaddr_storage storage;
+};
+
typedef struct SocketAddress {
typedef struct SocketAddress {
- union {
- struct sockaddr sa;
- struct sockaddr_in in4;
- struct sockaddr_in6 in6;
- struct sockaddr_un un;
- struct sockaddr_storage storage;
- } sockaddr;
+ union sockaddr_union sockaddr;
/* We store the size here explicitly due to the weird
* sockaddr_un semantics for abstract sockets */
/* We store the size here explicitly due to the weird
* sockaddr_un semantics for abstract sockets */