diff --git a/test/cdbget2.c b/test/cdbget2.c index 614638e..b69fc8f 100644 --- a/test/cdbget2.c +++ b/test/cdbget2.c @@ -5,13 +5,17 @@ #include #include +#ifndef O_BINARY +#define O_BINARY +#endif + int main(int argc,char* argv[]) { int fd; static struct cdb c; errmsg_iam("cdbget"); if (argc<3) die(1,"usage: cdbget data.cdb key"); - fd=open(argv[1],O_RDONLY); + fd=open(argv[1],O_RDONLY|O_BINARY); if (fd==-1) diesys(1,"open"); cdb_init(&c,fd);