From e93e15fae30dc34dd7c53779c12261df6d1897de Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 20 Nov 2009 21:25:51 +0000 Subject: existing code does not work on freebsd because there reading directory files directly is fine, also fixing buffer size issues --- src/util/test_bio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/util/test_bio.c') diff --git a/src/util/test_bio.c b/src/util/test_bio.c index dfd51297e..87617ddda 100644 --- a/src/util/test_bio.c +++ b/src/util/test_bio.c @@ -202,6 +202,7 @@ test_bigmeta_rw () static int test_directory_r () { +#if LINUX char *msg; char readResult[200]; struct GNUNET_BIO_ReadHandle *fileR; @@ -209,10 +210,11 @@ test_directory_r () fileR = GNUNET_BIO_read_open ("/dev"); GNUNET_assert (NULL != fileR); GNUNET_assert (GNUNET_SYSERR == - GNUNET_BIO_read (fileR, "Read error", readResult, 65537)); + GNUNET_BIO_read (fileR, "Read error", readResult, sizeof(readResult))); msg = NULL; GNUNET_BIO_read_close (fileR, &msg); GNUNET_free (msg); +#endif return 0; } @@ -264,7 +266,7 @@ test_nullfile_rw () fileR = GNUNET_BIO_read_open ("/dev/null"); GNUNET_assert (NULL != fileR); GNUNET_assert (GNUNET_SYSERR == - GNUNET_BIO_read (fileR, "Read error", readResult, 65537)); + GNUNET_BIO_read (fileR, "Read error", readResult, sizeof(readResult))); readResultString = NULL; GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_string (fileR, "Read string error", -- cgit v1.2.3