From b2be33504345c204dab33831f49b3640af4f283c Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 2 May 2007 06:26:43 +0000 Subject: [PATCH] win32 compat --- test/cdbget2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);