commit: e2f06703fe28a3dcc70b847d3b7723bf5c346763 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Sat Sep 26 23:42:05 2015 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Sat Sep 26 23:42:05 2015 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=e2f06703
libsbutil: gnulib: mark xgetcwd static inline Rather than use gnu inline where gcc can create external references (which we don't provide), just always inline the xgetcwd func. This fixes building at -O0 optimization levels. URL: https://bugs.gentoo.org/561342 Reported-by: Pryka <pryka.iluvatar <AT> gmail.com> Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> libsbutil/gnulib/xgetcwd.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libsbutil/gnulib/xgetcwd.h b/libsbutil/gnulib/xgetcwd.h index 765fab4..fbe0a7c 100644 --- a/libsbutil/gnulib/xgetcwd.h +++ b/libsbutil/gnulib/xgetcwd.h @@ -6,16 +6,12 @@ * Licensed under the GPL-2 */ -_GL_INLINE_HEADER_BEGIN - extern char *egetcwd(char *buf, size_t size); -_GL_INLINE char *xgetcwd(void) +static inline char *xgetcwd(void) { char *ret = egetcwd(NULL, 0); if (ret == NULL && errno == ENOMEM) xalloc_die(); return ret; } - -_GL_INLINE_HEADER_END