]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
shared: make scratchbuf_str static
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>
Wed, 9 Nov 2016 06:52:26 +0000 (08:52 +0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 11 Nov 2016 00:14:27 +0000 (22:14 -0200)
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

index c12e4902528fa7899b1a2a484311db7609579d63..27ea9d9f6008e4ce6ec6098b5d49f3267c02b0ae 100644 (file)
@@ -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;
 }