Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2017 12:23:22 -0800
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Cy Schubert <Cy.Schubert@cschubert.com>
Cc:        Scott Long <scottl@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r314399 - head/sys/sys
Message-ID:  <201702282023.v1SKNM9o091732@slippy.cwsent.com>
In-Reply-To: Message from Cy Schubert <Cy.Schubert@cschubert.com> of "Tue, 28 Feb 2017 12:16:22 -0800."

next in thread | previous in thread | raw e-mail | index | archive | help
Cy Schubert writes:
> In message <201702281901.v1SJ1xKE089703@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 c
> har *,
> >  		     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>

I picked the wrong one in exmh. This should be for r314397 instead.



-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702282023.v1SKNM9o091732>