diff --git a/daemon/misc.h b/daemon/misc.h index 8c677fa50..9380d39c0 100644 --- a/daemon/misc.h +++ b/daemon/misc.h @@ -68,6 +68,19 @@ struct bufferevent; #undef NULL #define NULL ( ( void * )0 ) +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + +#ifndef PF_LOCAL +#define PF_LOCAL PF_UNIX +#endif + +#ifndef SUN_LEN +#define SUN_LEN( sun ) \ + ( sizeof( *(sun) ) - sizeof( (sun)->sun_path ) + strlen( (sun)->sun_path ) ) +#endif + #define SAFEFREE( ptr ) \ do \ { \ diff --git a/daemon/remote.c b/daemon/remote.c index 612afcb11..0deb90c70 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -132,9 +132,9 @@ static struct torhashes gl_hashids = RB_INITIALIZER( &gl_hashids ); static int gl_gotlistinfo = 0; static int gl_gotliststat = 0; -RB_GENERATE_STATIC( torlist, torinfo, idlinks, toridcmp ); -RB_GENERATE_STATIC( tornames, torinfo, namelinks, tornamecmp ); -RB_GENERATE_STATIC( torhashes, torhash, link, torhashcmp ); +RB_GENERATE_STATIC( torlist, torinfo, idlinks, toridcmp ) +RB_GENERATE_STATIC( tornames, torinfo, namelinks, tornamecmp ) +RB_GENERATE_STATIC( torhashes, torhash, link, torhashcmp ) int main( int argc, char ** argv )