chiark / gitweb /
import: add new minimal tool "systemd-import" for pulling down foreign containers...
[elogind.git] / src / shared / util.h
index a15ce95a6564de73dcaac200e769e3374c4b0a10..96b8c1bcc0fdafd9e6efeb0c690aedb64aafd269 100644 (file)
@@ -883,6 +883,7 @@ int unlink_noerrno(const char *path);
                 (void *) memset(_new_, 0, _len_);       \
         })
 
+/* It's not clear what alignment glibc/gcc alloca() guarantee, hence provide a guaranteed safe version */
 #define alloca_align(size, align)                                       \
         ({                                                              \
                 void *_ptr_;                                            \
@@ -1017,6 +1018,7 @@ int fflush_and_check(FILE *f);
 
 int tempfn_xxxxxx(const char *p, char **ret);
 int tempfn_random(const char *p, char **ret);
+int tempfn_random_child(const char *p, char **ret);
 
 bool is_localhost(const char *hostname);
 
@@ -1038,3 +1040,5 @@ int sethostname_idempotent(const char *s);
         for ((e) = (struct inotify_event*) (buffer);    \
              (uint8_t*) (e) < (uint8_t*) (buffer) + (sz); \
              (e) = (struct inotify_event*) ((uint8_t*) (e) + sizeof(struct inotify_event) + (e)->len))
+
+#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)