summaryrefslogtreecommitdiff
path: root/src/systemd/src/basic/macro.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-09-16 16:53:25 +0200
committerThomas Haller <thaller@redhat.com>2015-09-16 16:54:03 +0200
commitc05557971c09782316ee7e39ae4e7a7675d338f1 (patch)
tree25595e64bb7f900b17766270b52e7696d4e615c7 /src/systemd/src/basic/macro.h
parent08916936bce4c8ac36156c040999add99175b455 (diff)
parente82f430eae841032c7961d2eca694435425e4d51 (diff)
downloadNetworkManager-c05557971c09782316ee7e39ae4e7a7675d338f1.tar.gz
systemd: merge branch 'systemd-integration' into master
Diffstat (limited to 'src/systemd/src/basic/macro.h')
-rw-r--r--src/systemd/src/basic/macro.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemd/src/basic/macro.h b/src/systemd/src/basic/macro.h
index b1cef217ab..80c64904e2 100644
--- a/src/systemd/src/basic/macro.h
+++ b/src/systemd/src/basic/macro.h
@@ -300,6 +300,9 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
#define PTR_TO_GID(p) ((gid_t) (((uintptr_t) (p))-1))
#define GID_TO_PTR(u) ((void*) (((uintptr_t) (u))+1))
+#define PTR_TO_PID(p) ((pid_t) ((uintptr_t) p))
+#define PID_TO_PTR(p) ((void*) ((uintptr_t) p))
+
#define memzero(x,l) (memset((x), 0, (l)))
#define zero(x) (memzero(&(x), sizeof(x)))