Message ID | 1478674346-29996-1-git-send-email-yauheni.kaliuta@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Wed, 2016-11-09 at 08:52 +0200, Yauheni Kaliuta wrote: > It fixes linking problem > > tools/depmod.o: In function `output_symbols_bin': > depmod.c:(.text.output_symbols_bin+0x135): undefined reference to > `scratchbuf_str' > > for -O0 build, where gcc doesn't actually inline it. > > Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> > --- Applied, thanks Lucas De Marchi
diff --git a/shared/scratchbuf.h b/shared/scratchbuf.h index c12e4902528f..27ea9d9f6008 100644 --- a/shared/scratchbuf.h +++ b/shared/scratchbuf.h @@ -19,7 +19,7 @@ int scratchbuf_alloc(struct scratchbuf *buf, size_t sz); void scratchbuf_release(struct scratchbuf *buf); /* Return a C string */ -inline char *scratchbuf_str(struct scratchbuf *buf) +static inline char *scratchbuf_str(struct scratchbuf *buf) { return buf->bytes; }
It fixes linking problem tools/depmod.o: In function `output_symbols_bin': depmod.c:(.text.output_symbols_bin+0x135): undefined reference to `scratchbuf_str' for -O0 build, where gcc doesn't actually inline it. Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> --- shared/scratchbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)