diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-09-26 19:42:05 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-09-26 19:42:05 -0400 |
commit | e2f06703fe28a3dcc70b847d3b7723bf5c346763 (patch) | |
tree | 9f6b698630304817d87ec8b4189584f6e3c9a982 /libsbutil | |
parent | sandbox: add proper option parsing (diff) | |
download | sandbox-e2f06703fe28a3dcc70b847d3b7723bf5c346763.tar.gz sandbox-e2f06703fe28a3dcc70b847d3b7723bf5c346763.tar.bz2 sandbox-e2f06703fe28a3dcc70b847d3b7723bf5c346763.zip |
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@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsbutil')
-rw-r--r-- | libsbutil/gnulib/xgetcwd.h | 6 |
1 files changed, 1 insertions, 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 |