$NetBSD: patch-ar,v 1.3 2006/04/11 15:08:38 joerg Exp $ --- uip/scansbr.c.orig 2006-04-11 14:23:48.000000000 +0000 +++ uip/scansbr.c @@ -253,6 +253,8 @@ register FILE *inb; while (state == BODY) { #ifdef _STDIO_USES_IOSTREAM if (scnout->_IO_write_ptr == scnout->_IO_write_end) { +#elif defined(__DragonFly__) + if (((struct __FILE_public *)scnout)->_r <= 0) { #else if (scnout->_cnt <= 0) { #endif @@ -264,6 +266,11 @@ register FILE *inb; (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end, inb); scnout->_IO_write_ptr += msg_count; +#elif defined(__DragonFly__) + state = m_getfld( state, name, ((struct __FILE_public *)scnout)->_p, + -(((struct __FILE_public *)scnout)->_r), inb ); + ((struct __FILE_public *)scnout)->_r -= msg_count; + ((struct __FILE_public *)scnout)->_p += msg_count; #else state = m_getfld( state, name, scnout->_ptr, -(scnout->_cnt), inb );