chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: introduce PERSONALITY_INVALID as macro for 0xffffffffLU
[elogind.git]
/
src
/
shared
/
util.h
diff --git
a/src/shared/util.h
b/src/shared/util.h
index 014e61c2e6f5807cb783a565b63a0a8f66edd056..abb36dfef5e9dce159c2f271812167f4a9903e44 100644
(file)
--- a/
src/shared/util.h
+++ b/
src/shared/util.h
@@
-816,6
+816,13
@@
int open_tmpfile(const char *path, int flags);
int fd_warn_permissions(const char *path, int fd);
int fd_warn_permissions(const char *path, int fd);
+#ifndef PERSONALITY_INVALID
+/* personality(7) documents that 0xffffffffUL is used for querying the
+ * current personality, hence let's use that here as error
+ * indicator. */
+#define PERSONALITY_INVALID 0xffffffffLU
+#endif
+
unsigned long personality_from_string(const char *p);
const char *personality_to_string(unsigned long);
unsigned long personality_from_string(const char *p);
const char *personality_to_string(unsigned long);