svn commit: r314399 - head/sys/sys
Cy Schubert
Cy.Schubert at komquats.com
Tue Feb 28 20:16:32 UTC 2017
In message <201702281901.v1SJ1xKE089703 at repo.freebsd.org>, Scott Long
writes:
> Author: scottl
> Date: Tue Feb 28 19:01:59 2017
> New Revision: 314399
> URL: https://svnweb.freebsd.org/changeset/base/314399
>
> Log:
> Add prototype for sbuf_putbuf()
>
> Sponsored by: Netflix
>
> Modified:
> head/sys/sys/sbuf.h
>
> Modified: head/sys/sys/sbuf.h
> =============================================================================
> =
> --- head/sys/sys/sbuf.h Tue Feb 28 18:48:12 2017 (r314398)
> +++ head/sys/sys/sbuf.h Tue Feb 28 19:01:59 2017 (r314399)
> @@ -99,6 +99,7 @@ void sbuf_start_section(struct sbuf *,
> ssize_t sbuf_end_section(struct sbuf *, ssize_t, size_t, int);
> void sbuf_hexdump(struct sbuf *, const void *, int, const char *,
> int);
> +void sbuf_putbuf(struct sbuf *);
>
> #ifdef _KERNEL
> struct uio;
>
>
Hi Scott,
This causes,
/opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: error:
implicitly declaring library function 'printf' with type 'int (const char
*, ...)' [-Werror,-Wimplicit-function-declaration]
printf("%s", sbuf_data(sb));
^
/opt/src/svn-current/lib/libsbuf/../../sys/kern/subr_prf.c:1243:2: note:
include the header <stdio.h> or explicitly provide a declaration for
'printf'
1 error generated.
*** [subr_prf.pico] Error code 1
make[4]: stopped in /opt/src/svn-current/lib/libsbuf
1 error
... and the fix...
Index: sys/kern/subr_prf.c
===================================================================
--- sys/kern/subr_prf.c (revision 314404)
+++ sys/kern/subr_prf.c (working copy)
@@ -60,6 +60,8 @@
#include <sys/syslog.h>
#include <sys/cons.h>
#include <sys/uio.h>
+#else
+#include <stdio.h>
#endif
#include <sys/ctype.h>
#include <sys/sbuf.h>
--
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX: <cy at FreeBSD.org> Web: http://www.FreeBSD.org
The need of the many outweighs the greed of the few.
More information about the svn-src-all
mailing list