You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-benchmarks/bonnie++/files/bonnie++-1.93c-64bit.patch

16 lines
646 B

--- getc_putc.cpp.old 2004-09-15 02:37:21.500489552 +0200
+++ getc_putc.cpp 2004-09-15 02:40:58.623481840 +0200
@@ -165,7 +165,11 @@
int size = 0, wrote;
while(size < file_size)
{
- wrote = write(FILE_FD, buf, min(sizeof(buf), (unsigned int)file_size - size));
+ //wrote = write(FILE_FD, buf, min(sizeof(buf), (unsigned int)file_size - size));
+ /*
+ * gcc doesn't like above line. ? : should do the job as good as min()...
+ */
+ wrote = write(FILE_FD, buf, (sizeof(buf) < (file_size - size) ? (sizeof(buf)):(file_size - size)));
if(wrote < 0)
{
fprintf(stderr, "Can't extend file - disk full?\n");