diff --git a/contrib/chg/hgclient.c b/contrib/chg/hgclient.c --- a/contrib/chg/hgclient.c +++ b/contrib/chg/hgclient.c @@ -7,6 +7,11 @@ * GNU General Public License version 2 or any later version. */ +#if defined(__sun) && !defined(_XOPEN_SOURCE) +/* msg_control is used */ +#define _XOPEN_SOURCE 600 +#endif + #include /* for ntohl(), htonl() */ #include #include @@ -26,6 +31,10 @@ #include "procutil.h" #include "util.h" +#ifndef O_DIRECTORY +#define O_DIRECTORY O_RDONLY +#endif + enum { CAP_GETENCODING = 0x0001, CAP_RUNCOMMAND = 0x0002,