X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bin%2Frootwrap.c;h=cff9476b5d8770b0ef197ce83be47002b55e8cd2;hb=8796e33a5ae150d629c2cfc5451658de134d923f;hp=f2c851a3544347ea5cdc522cf29a62f3f68c49e8;hpb=83b35c64b6e1f7c90b577724d3e3a1fa57b7b747;p=vlc diff --git a/bin/rootwrap.c b/bin/rootwrap.c index f2c851a354..cff9476b5d 100644 --- a/bin/rootwrap.c +++ b/bin/rootwrap.c @@ -45,6 +45,16 @@ #ifndef AF_LOCAL # define AF_LOCAL AF_UNIX #endif +/* Required yet non-standard cmsg functions */ +#ifndef CMSG_ALIGN +# define CMSG_ALIGN(len) (((len) + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1)) +#endif +#ifndef CMSG_SPACE +# define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len)) +#endif +#ifndef CMSG_LEN +# define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) +#endif static inline int is_allowed_port (uint16_t port) {