X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Ffdset.h;h=907acd76dd6a50aa9373d33afbea6428e6812fec;hp=a7bd5e2b40a798c9fae698440cdece50409f82e5;hb=141a79f491fd4bf5ea0d66039065c9f9649bfc0e;hpb=f934051c4d17d167bd8e46dd3c70a745e26fd2eb diff --git a/src/shared/fdset.h b/src/shared/fdset.h index a7bd5e2b4..907acd76d 100644 --- a/src/shared/fdset.h +++ b/src/shared/fdset.h @@ -22,6 +22,7 @@ ***/ #include "set.h" +#include "util.h" typedef struct FDSet FDSet; @@ -47,3 +48,6 @@ int fdset_iterate(FDSet *s, Iterator *i); #define FDSET_FOREACH(fd, fds, i) \ for ((i) = ITERATOR_FIRST, (fd) = fdset_iterate((fds), &(i)); (fd) >= 0; (fd) = fdset_iterate((fds), &(i))) + +DEFINE_TRIVIAL_CLEANUP_FUNC(FDSet*, fdset_free); +#define _cleanup_fdset_free_ _cleanup_(fdset_freep)